![]() |
ircproxy The Ultimate Cyborg |
00001 // ircproxy -- An IRC bouncer. 00002 // 00003 //! @file ExpressionInterface.h 00004 //! @brief This file contains the declaration of class ExpressionInterface. 00005 // 00006 // Copyright (C) 2006, 2007 by 00007 // 00008 // Carlo Wood, Run on IRC <carlo@alinoe.com> 00009 // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt 00010 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61 00011 // 00012 // This file may be distributed under the terms of the Q Public License 00013 // version 1.0 as appearing in the file LICENSE.QPL included in the 00014 // packaging of this file. 00015 00016 #ifndef EXPRESSIONINTERFACE_H 00017 #define EXPRESSIONINTERFACE_H 00018 00019 #ifndef USE_PCH 00020 #include <iosfwd> 00021 #include <boost/shared_ptr.hpp> 00022 #endif 00023 00024 class ExpressionEventServer; 00025 00026 /*! @brief Pure virtual interface for expressions. 00027 * 00028 * This class is a base class for expressions (that return true or false). 00029 */ 00030 class ExpressionInterface { 00031 public: 00032 //! virtual destructor. 00033 virtual ~ExpressionInterface() { } 00034 //! Mark that ExpressionEventServer \a event_server is watching this expression. 00035 virtual void add_event_server(boost::shared_ptr<ExpressionEventServer> const& event_server) = 0; 00036 //! Evaluate the expression. 00037 virtual bool evaluate(void) = 0; 00038 //! Remove ExpressionEventServer \a event_server from this expression. 00039 virtual void sub_event_server(ExpressionEventServer*) = 0; 00040 #ifdef CWDEBUG 00041 //! Print the expression on ostream \a os 00042 virtual void print_on(std::ostream& os) const = 0; 00043 #endif 00044 }; 00045 00046 #endif // EXPRESSIONINTERFACE_H 00047
Copyright © 2005-2007 Carlo Wood. All rights reserved. |
---|