Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Examples

Colleague.hpp

00001 #if !defined(__COLLEAGUE_HPP) 00002 #define __COLLEAGUE_HPP 00003 00004 /* 00005 CoreLinux++ 00006 Copyright (C) 2000 CoreLinux Consortium 00007 00008 The CoreLinux++ Library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public License as 00010 published by the Free Software Foundation; either version 2 of the 00011 License, or (at your option) any later version. 00012 00013 The CoreLinux++ Library Library is distributed in the hope that it will 00014 be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public 00019 License along with the GNU C Library; see the file COPYING.LIB. If not, 00020 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 Boston, MA 02111-1307, USA. 00022 */ 00023 00024 #if !defined(__COMMON_HPP) 00025 #include <Common.hpp> 00026 #endif 00027 00028 #if !defined(__VECTOR_HPP) 00029 #include <Vector.hpp> 00030 #endif 00031 00032 #if !defined(__EVENT_HPP) 00033 #include <Event.hpp> 00034 #endif 00035 00036 namespace corelinux 00037 { 00038 CORELINUX_VECTOR( IdentifierPtr , EventIdentifiers ); 00039 00040 DECLARE_CLASS( Mediator ); 00041 00042 DECLARE_CLASS( Colleague ); 00043 00049 class Colleague 00050 { 00051 public: 00052 00053 // 00054 // Constructors and destructor 00055 // 00056 00064 Colleague( MediatorPtr ) 00065 throw ( NullPointerException ); 00066 00073 Colleague( ColleagueCref ); 00074 00076 00077 virtual ~Colleague( void ); 00078 00079 // 00080 // Operator overloads 00081 // 00082 00084 00085 ColleagueRef operator=( ColleagueCref ); 00086 00088 00089 bool operator==( ColleagueCref ) const; 00090 00091 // 00092 // Accessors 00093 // 00094 00101 virtual void getEventsGenerated( EventIdentifiersRef ) = 0; 00102 00109 virtual void getInterestedEvents( EventIdentifiersRef ) = 0; 00110 00111 // 00112 // Mutators 00113 // 00114 00122 virtual void action( Event<Identifier> * ) = 0; 00123 00124 protected: 00125 00126 // 00127 // Constructor 00128 // 00130 00131 Colleague( void ) throw ( Assertion ); 00132 00133 // 00134 // Service method 00135 // 00143 virtual void invokeMediator( Event<Identifier> * ) throw ( NullPointerException ); 00144 00145 private: 00146 00148 00149 MediatorPtr theMediator; 00150 }; 00151 } 00152 00153 #endif // if !defined(__COLLEAGUE_HPP) 00154 00155 /* 00156 Common rcs information do not modify 00157 $Author: prudhomm $ 00158 $Revision: 1.2 $ 00159 $Date: 2000/08/31 22:52:20 $ 00160 $Locker: $ 00161 */ 00162 00163

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium