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

EquipmentComposite.hpp

00001 #if !defined(__EQUIPMENTCOMPOSITE_HPP) 00002 #define __EQUIPMENTCOMPOSITE_HPP 00003 00004 /* 00005 CoreLinux++ 00006 Copyright (C) 1999,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 00025 #if !defined(__COMMON_HPP) 00026 #include <Common.hpp> 00027 #endif 00028 00029 #if !defined(__COMPOSITEEXCEPTION_HPP) 00030 #include <CompositeException.hpp> 00031 #endif 00032 00033 #if !defined(__EQUIPMENT_HPP) 00034 #include <Equipment.hpp> 00035 #endif 00036 00037 00039 00040 DECLARE_CLASS( EquipmentComposite ); 00041 00050 class EquipmentComposite : public Equipment 00051 { 00052 public: 00053 00054 // 00055 // Constructors and Destructors 00056 // 00058 00059 EquipmentComposite( NameCref ); 00060 00062 00063 EquipmentComposite( EquipmentCompositeCref ); 00064 00066 00067 virtual ~EquipmentComposite( void ); 00068 00069 // 00070 // Operators 00071 // 00073 00074 bool operator==( EquipmentCompositeCref ) const; 00075 00076 // 00077 // Accessors 00078 // 00080 00081 virtual Watt getPower( void ) ; 00082 00083 // 00084 // Mutators overloaded from TransparentComponent 00085 // 00086 00087 virtual void addComponent( EquipmentPtr ) throw(CORELINUX(InvalidCompositeException)); 00088 00089 virtual void removeComponent( EquipmentPtr ) throw(CORELINUX(InvalidCompositeException)); 00090 00091 // 00092 // Factory overloaded from TransparentComponent 00093 // 00094 00096 00097 virtual CORELINUX(Iterator)<EquipmentPtr>* createIterator( void ) throw(CORELINUX(InvalidCompositeException)); 00098 00100 00101 virtual void destroyIterator( CORELINUX(Iterator)<EquipmentPtr>* ) throw(CORELINUX(InvalidCompositeException)); 00102 00103 protected: 00104 00105 // 00106 // Constructors 00107 // 00109 00110 EquipmentComposite( void ) 00111 throw(CORELINUX(CompositeException)); 00112 00113 00114 // 00115 // Operators 00116 // 00118 00119 EquipmentCompositeRef operator=( EquipmentCompositeCref ) 00120 throw(CORELINUX(CompositeException)); 00121 00122 00123 private: 00124 00125 }; 00126 00127 #endif // if !defined(__EQUIPMENTCOMPOSITE_HPP); 00128 00129 /* 00130 Common rcs information do not modify 00131 $Author: prudhomm $ 00132 $Revision: 1.3 $ 00133 $Date: 2000/08/31 22:49:00 $ 00134 $Locker: $ 00135 */ 00136 00137

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