ircproxy The Ultimate Cyborg |
#include <Watched.h>
Definition at line 32 of file Watched.h.
Public Types | |
typedef T const & | evaluation_type |
The type that the expression evaluates to. | |
Public Member Functions | |
WatchedExpression (Watched< T > &b) | |
Construct a WatchedExpression for Watched object b. | |
ExpressionEventServer & | create_event_server (void) |
Create and return an event server that is watching this expression. | |
T const & | evaluate_impl (void) const |
Return the value of the underlying type. | |
void | sub_event_server_impl (ExpressionEventServer *) |
Remove event server event_server from the notification list. | |
virtual void | add_event_server (boost::shared_ptr< ExpressionEventServer > const &event_server) |
Add Expression event server event_server to the notification list. | |
virtual bool | evaluate (void) |
Implement pure virtual ExpressionInterface::evaluate. | |
virtual void | sub_event_server (ExpressionEventServer *event_server) |
Implementation of pure virtual function ExpressionInterface::sub_event_server. | |
virtual void | print_on (std::ostream &os) const |
For debugging purpose; write the (debug) name of this object to os. | |
Private Attributes | |
Watched< T > & | M_b |
A reference to the watched object. |
typedef T const& WatchedExpression< T >::evaluation_type |
WatchedExpression< T >::WatchedExpression | ( | Watched< T > & | b | ) | [inline] |
Construct a WatchedExpression for Watched object b.
Definition at line 41 of file Watched.h.
Referenced by WatchedExpression< T >::create_event_server().
00041 : M_b(b) { }
ExpressionEventServer & WatchedExpression< T >::create_event_server | ( | void | ) | [inline] |
Create and return an event server that is watching this expression.
Definition at line 21 of file Watched.inl.
References debug::channels::dc::expression, and WatchedExpression< T >::WatchedExpression().
00022 { 00023 boost::shared_ptr<ExpressionInterface> expression(new WatchedExpression(*this)); 00024 boost::shared_ptr<ExpressionEventServer> event_server(new ExpressionEventServer(expression)); 00025 expression->add_event_server(event_server); 00026 return *event_server; 00027 }
T const & WatchedExpression< T >::evaluate_impl | ( | void | ) | const [inline] |
Return the value of the underlying type.
Definition at line 278 of file Watched.h.
References WatchedExpression< T >::M_b.
00279 { 00280 return M_b.value(); 00281 }
void WatchedExpression< T >::sub_event_server_impl | ( | ExpressionEventServer * | event_server | ) | [inline] |
Remove event server event_server from the notification list.
Remove Expression event server event_server to the notification list.
Definition at line 285 of file Watched.h.
References WatchedExpression< T >::M_b.
Referenced by WatchedExpression< T >::sub_event_server().
00286 { 00287 M_b.sub_event_server(event_server); 00288 }
void WatchedExpression< T >::add_event_server | ( | boost::shared_ptr< ExpressionEventServer > const & | event_server | ) | [inline, virtual] |
Add Expression event server event_server to the notification list.
Implements ExpressionInterface.
Definition at line 271 of file Watched.h.
References WatchedExpression< T >::M_b.
00272 { 00273 M_b.add_event_server(event_server); 00274 }
virtual bool WatchedExpression< T >::evaluate | ( | void | ) | [inline, virtual] |
Implement pure virtual ExpressionInterface::evaluate.
Implements ExpressionInterface.
Definition at line 56 of file Watched.h.
00057 { DoutFatal(dc::core, "Calling WatchedExpression<" << type_info_of<T>().demangled_name() << ">::evaluate()"); 00058 return false; /* Dummy return to suppress compiler warning (argh) */ }
virtual void WatchedExpression< T >::sub_event_server | ( | ExpressionEventServer * | event_server | ) | [inline, virtual] |
Implementation of pure virtual function ExpressionInterface::sub_event_server.
Implements ExpressionInterface.
Definition at line 60 of file Watched.h.
References WatchedExpression< T >::sub_event_server_impl().
00060 { sub_event_server_impl(event_server); }
void WatchedExpression< T >::print_on | ( | std::ostream & | os | ) | const [inline, virtual] |
For debugging purpose; write the (debug) name of this object to os.
Implements ExpressionInterface.
Definition at line 263 of file Watched.h.
References WatchedExpression< T >::M_b.
00264 { 00265 M_b.print_name(os); 00266 }
Watched<T>& WatchedExpression< T >::M_b [private] |
A reference to the watched object.
Definition at line 37 of file Watched.h.
Referenced by WatchedExpression< T >::add_event_server(), WatchedExpression< T >::evaluate_impl(), WatchedExpression< T >::print_on(), and WatchedExpression< T >::sub_event_server_impl().
Copyright © 2005-2007 Carlo Wood. All rights reserved. |
---|