ircproxy The Ultimate Cyborg |
#include <Bool.h>
Definition at line 32 of file Bool.h.
Public Types | |
typedef BoolExpression<!inverted > | inverted_type |
The type of the inverted expression. | |
typedef bool | evaluation_type |
The return type of evaluate_impl. | |
Public Member Functions | |
BoolExpression (Bool &b) | |
Copy constructor. | |
BoolExpression<!inverted > | operator! (void) const |
Inversion operator. Returns an inverted expression. | |
ExpressionEventServer & | create_event_server (void) |
Create and return an event server that is watching this expression. | |
bool | evaluate_impl (void) const |
Evaluate this expression. | |
void | sub_event_server_impl (ExpressionEventServer *) |
Implementation of sub_event_server(). Remove event server event_server from the notification list. | |
virtual void | add_event_server (boost::shared_ptr< ExpressionEventServer > const &event_server) |
Add event server event_server to notification list. | |
virtual bool | evaluate (void) |
Implementation of pure virtual function 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 purposes. Write the contents of this object to os. | |
Private Attributes | |
Bool & | M_b |
The underlying Bool. |
typedef BoolExpression<!inverted> BoolExpression< inverted >::inverted_type |
typedef bool BoolExpression< inverted >::evaluation_type |
BoolExpression< inverted >::BoolExpression | ( | Bool & | b | ) | [inline] |
Copy constructor.
Definition at line 42 of file Bool.h.
Referenced by BoolExpression< inverted >::create_event_server().
00042 : M_b(b) { }
BoolExpression<!inverted> BoolExpression< inverted >::operator! | ( | void | ) | const [inline] |
Inversion operator. Returns an inverted expression.
Definition at line 45 of file Bool.h.
References BoolExpression< inverted >::M_b.
00045 { return BoolExpression<!inverted>(M_b); }
ExpressionEventServer & BoolExpression< inverted >::create_event_server | ( | void | ) | [inline] |
Create and return an event server that is watching this expression.
Definition at line 21 of file Bool.inl.
References BoolExpression< inverted >::BoolExpression(), and debug::channels::dc::expression.
00022 { 00023 boost::shared_ptr<ExpressionInterface> expression(new BoolExpression(*this)); 00024 boost::shared_ptr<ExpressionEventServer> event_server(new ExpressionEventServer(expression)); 00025 expression->add_event_server(event_server); 00026 return *event_server; 00027 }
bool BoolExpression< inverted >::evaluate_impl | ( | void | ) | const [inline] |
Evaluate this expression.
Definition at line 177 of file Bool.h.
References BoolExpression< inverted >::M_b, and Bool::value().
Referenced by BoolExpression< inverted >::evaluate().
void BoolExpression< inverted >::sub_event_server_impl | ( | ExpressionEventServer * | event_server | ) | [inline] |
Implementation of sub_event_server(). Remove event server event_server from the notification list.
Definition at line 184 of file Bool.h.
References BoolExpression< inverted >::M_b, and Bool::sub_event_server().
Referenced by BoolExpression< inverted >::sub_event_server().
00185 { 00186 M_b.sub_event_server(event_server); 00187 }
void BoolExpression< inverted >::add_event_server | ( | boost::shared_ptr< ExpressionEventServer > const & | event_server | ) | [inline, virtual] |
Add event server event_server to notification list.
Implements ExpressionInterface.
Definition at line 168 of file Bool.h.
References Bool::add_event_server(), and BoolExpression< inverted >::M_b.
00169 { 00170 M_b.add_event_server(event_server); 00171 }
virtual bool BoolExpression< inverted >::evaluate | ( | void | ) | [inline, virtual] |
Implementation of pure virtual function ExpressionInterface::evaluate.
Implements ExpressionInterface.
Definition at line 55 of file Bool.h.
References BoolExpression< inverted >::evaluate_impl().
00055 { return evaluate_impl(); }
virtual void BoolExpression< inverted >::sub_event_server | ( | ExpressionEventServer * | event_server | ) | [inline, virtual] |
Implementation of pure virtual function ExpressionInterface::sub_event_server.
Implements ExpressionInterface.
Definition at line 57 of file Bool.h.
References BoolExpression< inverted >::sub_event_server_impl().
00057 { sub_event_server_impl(event_server); }
void BoolExpression< inverted >::print_on | ( | std::ostream & | os | ) | const [inline, virtual] |
For debugging purposes. Write the contents of this object to os.
Implements ExpressionInterface.
Definition at line 158 of file Bool.h.
References BoolExpression< inverted >::M_b, and Bool::print_name().
00159 { 00160 if (inverted) 00161 os << '!'; 00162 M_b.print_name(os); 00163 }
Bool& BoolExpression< inverted >::M_b [private] |
The underlying Bool.
Definition at line 38 of file Bool.h.
Referenced by BoolExpression< inverted >::add_event_server(), BoolExpression< inverted >::evaluate_impl(), BoolExpression< inverted >::operator!(), BoolExpression< inverted >::print_on(), and BoolExpression< inverted >::sub_event_server_impl().
Copyright © 2005-2007 Carlo Wood. All rights reserved. |
---|