BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
compositeManager.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_VIEW_KERNEL_COMPOSITEMANAGER_H
6 #define BALL_VIEW_KERNEL_COMPOSITEMANAGER_H
7 
8 #ifndef BALL_DATATYPE_HASHSET_H
9 # include <BALL/DATATYPE/hashSet.h>
10 #endif
11 
12 namespace BALL
13 {
14  class Composite;
15  class System;
16 
17  namespace VIEW
18  {
27  {
28  public:
33  typedef Composite *& reference;
34  typedef Composite** pointer;
35  typedef const Composite*& const_reference;
36  typedef const Composite** const_pointer;
38  typedef Size size_type;
40 
43 
46 
48 
51 
55 
59 
62  virtual ~CompositeManager();
63 
66  virtual void clear();
67 
69 
72 
76  bool has(const Composite* composite) const;
77 
81  bool hasRoot(const Composite* composite) const;
82 
84 
87 
92  bool insert(Composite& composite);
93 
97  void remove(Composite& composite, bool to_delete = true);
98 
102  { return composite_set_.size();}
103 
105 
108 
111  { return composite_set_.begin();}
112 
115  { return composite_set_.end();}
116 
119  { return composite_set_.begin();}
120 
123  { return composite_set_.end();}
124 
127  { return composite_set_;}
128 
131  { return composite_set_;}
132 
138  virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
139 
141 
142  private:
143 
144  HashSet<Composite*> composite_set_;
145  HashSet<String> name_set_;
146  };
147 
148  } // namespace VIEW
149 } // namespace BALL
150 
151 #endif // BALL_VIEW_KERNEL_COMPOSITEMANAGER_H
const Composite *& const_reference
HashSet< Composite * >::ConstIterator CompositeConstIterator
CompositeConstIterator begin() const
HashSet< Composite * >::Iterator CompositeIterator
static ConstForwardIterator end(const Container &container)
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
HashSet< Composite * >::Iterator iterator
const HashSet< Composite * > & getComposites() const
CompositeConstIterator end() const
static ForwardIterator end(const Container &container)
static ConstForwardIterator begin(const Container &container)
const Composite ** const_pointer
HashSet< Composite * > & getComposites()
static ForwardIterator begin(const Container &container)