Loading...
Searching...
No Matches
chainIterator.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: chainIterator.h,v 1.21 2005/10/23 12:02:18 oliver Exp $
//
#ifndef BALL_KERNEL_CHAINITERATOR_H
#define BALL_KERNEL_CHAINITERATOR_H
#ifndef BALL_KERNEL_CHAIN_H
# include <BALL/KERNEL/chain.h>
#endif
#ifndef BALL_KERNEL_ITERATOR_H
# include <BALL/KERNEL/iterator.h>
#endif
#ifndef BALL_KERNEL_PREDICATE_H
# include <BALL/KERNEL/predicate.h>
#endif
#ifndef BALL_CONCEPT_STDITERATORWRAPPER_H
# include <BALL/CONCEPT/stdIteratorWrapper.h>
#endif
namespace BALL
{
class BALL_EXPORT ChainIteratorTraits
: public CompositeIteratorTraits
{
public:
inline ChainIteratorTraits();
ChainIteratorTraits(const Composite& composite);
inline ChainIteratorTraits(const ChainIteratorTraits& traits);
ChainIteratorTraits& operator = (const ChainIteratorTraits& traits);
void resetPredicate();
};
inline ChainIteratorTraits::ChainIteratorTraits()
: CompositeIteratorTraits()
{
predicate_ = &RTTI::getDefault<KernelPredicate<Chain> >();
}
inline ChainIteratorTraits::ChainIteratorTraits(const Composite& composite)
: CompositeIteratorTraits(composite)
{
predicate_ = &RTTI::getDefault<KernelPredicate<Chain> >();
}
inline ChainIteratorTraits::ChainIteratorTraits(const ChainIteratorTraits& traits)
: CompositeIteratorTraits(traits)
{
}
inline ChainIteratorTraits& ChainIteratorTraits::operator = (const ChainIteratorTraits& traits)
{
CompositeIteratorTraits::operator=(traits);
return *this;
}
inline void ChainIteratorTraits::resetPredicate()
{
predicate_ = &RTTI::getDefault<KernelPredicate<Chain> >();
}
typedef BidirectionalIterator<Composite, Chain, Composite::CompositeIterator, ChainIteratorTraits>
ChainIterator;
typedef ConstBidirectionalIterator<Composite, Chain, Composite::CompositeIterator, ChainIteratorTraits>
ChainConstIterator;
typedef std::reverse_iterator<ChainIterator> ChainReverseIterator;
typedef std::reverse_iterator<ChainConstIterator> ChainConstReverseIterator;
IteratorWrapper(Chain)
ConstIteratorWrapper(Chain)
} // namespace BALL
#endif // BALL_KERNEL_CHAINITERATOR_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
predicate.h
chain.h
BALL::BidirectionalIterator
Mutable bidirectional iterator.
Definition bidirectionalIterator.h:260
BALL::ChainIteratorTraits::resetPredicate
void resetPredicate()
Definition chainIterator.h:73
BALL::ChainIteratorTraits::operator=
ChainIteratorTraits & operator=(const ChainIteratorTraits &traits)
Definition chainIterator.h:67
BALL::ChainIteratorTraits::ChainIteratorTraits
ChainIteratorTraits()
Definition chainIterator.h:50
BALL::Chain
Definition chain.h:32
BALL::CompositeIteratorTraits::predicate_
const UnaryPredicate< Composite > * predicate_
The predicate.
Definition iterator.h:235
BALL::CompositeIteratorTraits::CompositeIteratorTraits
CompositeIteratorTraits()
Default constructor.
Definition iterator.h:238
BALL::CompositeIteratorTraits::operator=
CompositeIteratorTraits & operator=(const CompositeIteratorTraits &traits)
Assignment operator.
Definition iterator.h:259
BALL::Composite
Definition composite.h:74
BALL::ConstBidirectionalIterator
Definition bidirectionalIterator.h:25
iterator.h
BALL::RTTI::getDefault
const T & getDefault()
Definition rtti.h:75
BALL
Definition constants.h:13
BALL::ChainReverseIterator
std::reverse_iterator< ChainIterator > ChainReverseIterator
A mutable reverse bidirectional iterator for the Chain class.
Definition chainIterator.h:92
BALL::ChainConstIterator
ConstBidirectionalIterator< Composite, Chain, Composite::CompositeIterator, ChainIteratorTraits > ChainConstIterator
A constant bidirectional iterator for the Chain class.
Definition chainIterator.h:89
BALL::ChainIterator
BidirectionalIterator< Composite, Chain, Composite::CompositeIterator, ChainIteratorTraits > ChainIterator
A mutable bidirectional iterator for the Chain class.
Definition chainIterator.h:85
BALL::ChainConstReverseIterator
std::reverse_iterator< ChainConstIterator > ChainConstReverseIterator
A constant reverse bidirectional iterator for the Chain class.
Definition chainIterator.h:95
stdIteratorWrapper.h
ConstIteratorWrapper
#define ConstIteratorWrapper(type)
Definition stdIteratorWrapper.h:17
IteratorWrapper
#define IteratorWrapper(type)
Definition stdIteratorWrapper.h:4