BALL  1.5.0
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 
88 
98 
106 
112 
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
Definition: constants.h:13
void notify_(Message &message)
bool isConnectionObjectRegistered(const ConnectionObject &object)
void unregisterConnectionObject(ConnectionObject &object)
ConnectionObject * getParent() const
void notify_(Message *message)
virtual bool isValid() const
virtual void onNotify(Message *message)
ConnectionObject * getRoot()
void onNotify_(Message *message)
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
void registerConnectionObject(ConnectionObject &object)
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52