BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
connectionObject.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_CONNECTIONOBJECT_H
6 #define BALL_VIEW_KERNEL_CONNECTIONOBJECT_H
7 
8 #ifndef BALL_COMMON_MACROS_H
9 # include <BALL/COMMON/macros.h>
10 #endif
11 
12 namespace BALL
13 {
14  namespace VIEW
15  {
16  class Message;
17 
40  {
41  public:
42 
46 
51 
53 
56 
61  virtual ~ConnectionObject();
62 
67  virtual void clear();
68 
73  virtual void destroy();
74 
76 
79 
87  void registerConnectionObject(ConnectionObject &object);
88 
97  void unregisterConnectionObject(ConnectionObject &object);
98 
105  bool isConnectionObjectRegistered(const ConnectionObject &object);
106 
111  ConnectionObject* getParent() const;
112 
116  ConnectionObject* getRoot();
117 
126  virtual void onNotify(Message *message);
127 
129 
132 
145  virtual bool isValid() const;
146 
153  virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
154 
156 
160 
161  protected:
162 
183  void notify_(Message *message);
184 
191  void notify_(Message &message);
192 
194 
195  protected:
196 
197  void onNotify_(Message* message);
198 
199  private:
200 
201  void setParent_(ConnectionObject &object);
202 
203  void clearParent_();
204 
205 
206  bool processing_message_queue_;
207  std::list<Message *> message_queue_;
208 
209  ConnectionObject *parent_;
210  std::list<ConnectionObject *> children_connection_objects_;
211  };
212 
213 # ifndef BALL_NO_INLINE_FUNCTIONS
214 # include <BALL/VIEW/KERNEL/connectionObject.iC>
215 # endif
216 
217 } } // namespace
218 #endif // BALL_VIEW_KERNEL_CONNECTIONOBJECT_H
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52