libyui  3.3.2
YChildrenRejector< T > Class Template Reference

Children manager that rejects all children. More...

#include <YChildrenManager.h>

Inheritance diagram for YChildrenRejector< T >:
Collaboration diagram for YChildrenRejector< T >:

Public Member Functions

 YChildrenRejector (T *containerParent)
 Constructor.
 
virtual void add (T *child)
 Add a new child. More...
 
- Public Member Functions inherited from YChildrenManager< T >
 YChildrenManager (T *containerParent)
 Constructor. More...
 
virtual ~YChildrenManager ()
 Destructor.
 
bool hasChildren () const
 Check if there are any children.
 
bool empty () const
 Check if the children list is empty, i.e. More...
 
int count () const
 Returns the number of children.
 
ChildrenList::iterator begin ()
 Return an iterator that points to the first child.
 
ChildrenList::iterator end ()
 Return an iterator that points after the last child.
 
ChildrenList::const_iterator begin () const
 Return an iterator that points to the first child.
 
ChildrenList::const_iterator end () const
 Return an iterator that points after the last child.
 
ChildrenList::const_reverse_iterator rbegin () const
 Return a reverse iterator that points to the last child.
 
ChildrenList::const_reverse_iterator rend () const
 Return a reverse iterator that points before the first child.
 
T * firstChild ()
 Returns the first child or 0 if there is none. More...
 
T * lastChild ()
 Returns the last child or 0 if there is none.
 
virtual void remove (T *child)
 Remove a child. More...
 
virtual void clear ()
 Remove all children. More...
 
bool contains (T *child) const
 Check if the children list contains the specified child. More...
 
T * container () const
 Returns the associated container, i.e. More...
 

Additional Inherited Members

- Public Types inherited from YChildrenManager< T >
typedef std::list< T * > ChildrenList
 
- Protected Attributes inherited from YChildrenManager< T >
T * _container
 
ChildrenList _children
 

Detailed Description

template<class T>
class YChildrenRejector< T >

Children manager that rejects all children.

Useful for widget classes that can't handle children such as YPushButton, YSelectionBox etc.

Definition at line 214 of file YChildrenManager.h.

Member Function Documentation

◆ add()

template<class T >
virtual void YChildrenRejector< T >::add ( T *  child)
inlinevirtual

Add a new child.

Reimplemented from YChildrenManager.

Since this class is designed to reject children, this always throws a YUITooManyChildrenException.

Reimplemented from YChildrenManager< T >.

Definition at line 232 of file YChildrenManager.h.

Here is the call graph for this function:

The documentation for this class was generated from the following file: