#include <EquipmentComposite.hpp>
Inheritance diagram for EquipmentComposite
Public Methods | |
EquipmentComposite ( NameCref ) | |
Always requires a name in derivations. | |
EquipmentComposite ( EquipmentCompositeCref ) | |
Copy constructor - DEEP copy. | |
virtual | ~EquipmentComposite ( void ) |
Virtual destructor. | |
bool | operator== ( EquipmentCompositeCref ) const |
Equal if theName == theName. | |
virtual Watt | getPower ( void ) |
Return the power requirement. | |
virtual void | addComponent ( EquipmentPtr ) throw (corelinux::InvalidCompositeException ) |
virtual void | removeComponent ( EquipmentPtr ) throw (corelinux::InvalidCompositeException ) |
virtual corelinux::Iterator< EquipmentPtr>* | createIterator ( void ) throw (corelinux::InvalidCompositeException ) |
Create a iterator and manage it's instance. | |
virtual void | destroyIterator ( corelinux::Iterator <EquipmentPtr>* ) throw (corelinux::InvalidCompositeException ) |
Destroy the iterator if it is ours. | |
Protected Methods | |
EquipmentComposite ( void ) throw (corelinux::CompositeException ) | |
Default constructor not allowed. | |
EquipmentCompositeRef | operator= ( EquipmentCompositeCref ) throw (corelinux::CompositeException ) |
Assignment operator can't overwrite name. |
In our implementation we use the EquipmentComposite as the concrete composite. Other implementations may wish to extend the Equipment composite to real world composit types of the problem domain.