|
Schnek
|
A container for child blocks of a given type. More...
#include <blockcontainer.hpp>
Public Types | |
| typedef boost::iterator_range< typename std::list< boost::shared_ptr< ChildType > >::const_iterator > | iterator_range |
| The iterator range type that is returned by childBlocks() | |
| typedef iterator_range::iterator | iterator |
| The iterator type. | |
Protected Member Functions | |
| iterator_range | childBlocks () |
| Return the child blocks. More... | |
| size_t | numChildren () |
| Returns the number of child blocks. | |
A container for child blocks of a given type.
Block implementations can inherit from this class template to signal that they contain a number of child blocks of a given type. The ChildType can be a base class with multiple implementations.
This class works in conjunction with ChildBlock<ChildType>. Only if the ChildType extends ChildBlock<ChildType> will any children be added to this container.
BlockContainer makes available two methods that allow querying and iterating over the child blocks
|
inlineprotected |
Return the child blocks.
This method returns an iterator range over the child blocks. Children are returned in the order they have been added which is usually the order in which they have been specified in the setup file.