TransparentComponent.hpp
#if !defined (__TRANSPARENTCOMPONENT_HPP)
#define __TRANSPARENTCOMPONENT_HPP
/*
CoreLinux++
Copyright (C) 1999,2000 CoreLinux Consortium
The CoreLinux++ Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The CoreLinux++ Library Library is distributed in the hope that it will
be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#if !defined(__COMMON_HPP)
#include <Common.hpp>
#endif
#if !defined(__COMPONENT_HPP)
#include <Component.hpp>
#endif
#if !defined(__ITERATOR_HPP)
#include <Iterator.hpp>
#endif
#if !defined(__INVALIDCOMPOSITEEXCEPTION_HPP)
#include <InvalidCompositeException.hpp>
#endif /* __INVALIDCOMPOSITEEXCEPTION_HPP */
namespace corelinux
{
DECLARE_CLASS(InvalidCompositeException);
template<class CompImpl>
class TransparentComponent : public Component
{
public:
TransparentComponent( void )
:
Component()
{
; // do nothing
}
TransparentComponent
(
const TransparentComponent & aRef
)
:
Component( aRef )
{
; // do nothing
}
virtual ~TransparentComponent( void )
{
; // do nothing
}
//
// Operator overloads
//
TransparentComponent & operator=( const TransparentComponent & )
{
return (*this);
}
bool operator==
(
const TransparentComponent & aRef
) const
{
return (*this = aRef);
}
bool operator!=
(
const TransparentComponent & aRef
) const
{
return !(*this = aRef);
}
//
// Accessors
//
//
// Mutators
//
virtual void addComponent( CompImpl )
throw(InvalidCompositeException)
{
throw InvalidCompositeException(LOCATION);
}
virtual void removeComponent( CompImpl )
throw(InvalidCompositeException)
{
throw InvalidCompositeException(LOCATION);
}
//
// Factories
//
virtual Iterator<CompImpl>* createIterator( void )
throw(InvalidCompositeException)
{
throw InvalidCompositeException(LOCATION);
}
virtual void destroyIterator( Iterator<CompImpl> * )
throw(InvalidCompositeException)
{
throw InvalidCompositeException(LOCATION);
}
};
}
#endif // if !defined(__TRANSPARENTCOMPONENT_HPP)
/*
Common rcs information do not modify
$Author: prudhomm $
$Revision: 1.2 $
$Date: 2000/08/31 22:52:20 $
$Locker: $
*/
corelinux::TransparentComponent
A TransparentComponent is a templated Component whereas it declares the interface for the objects in ...
Definition: TransparentComponent.hpp:52
corelinux::TransparentComponent::addComponent
virtual void addComponent(CompImpl)
Interface for adding component children to a composition.
Definition: TransparentComponent.hpp:145
corelinux::TransparentComponent::createIterator
virtual Iterator< CompImpl > * createIterator(void)
Interface for creating an Iterator to iterate through the children of a composition.
Definition: TransparentComponent.hpp:180
corelinux::TransparentComponent::~TransparentComponent
virtual ~TransparentComponent(void)
Virtual Destructor.
Definition: TransparentComponent.hpp:81
corelinux::Component
A Component declares the interface for the objects in a composition and implements default behavior...
Definition: Component.hpp:42
corelinux::TransparentComponent::destroyIterator
virtual void destroyIterator(Iterator< CompImpl > *)
Interface for returning a created Iterator.
Definition: TransparentComponent.hpp:197
corelinux::InvalidCompositeException
InvalidCompositeException is an exception that is usually thrown when a composite operation is attemp...
Definition: InvalidCompositeException.hpp:44
corelinux::TransparentComponent::operator=
TransparentComponent & operator=(const TransparentComponent &)
Assignment operator overload.
Definition: TransparentComponent.hpp:95
corelinux::TransparentComponent::TransparentComponent
TransparentComponent(void)
Default Constructor.
Definition: TransparentComponent.hpp:58
corelinux::TransparentComponent::removeComponent
virtual void removeComponent(CompImpl)
Interface for removing component children from a composition.
Definition: TransparentComponent.hpp:160
corelinux::Component::Component
Component(void)
Default Constructor.
Definition: Component.cpp:39
corelinux::Iterator
The Iterator provides a way to access the elements of an collection type sequentially without exposin...
Definition: Iterator.hpp:44

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