Loading...
Searching...
No Matches
atomIterator.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: atomIterator.h,v 1.21 2005/10/23 12:02:17 oliver Exp $
//
#ifndef BALL_KERNEL_ATOMITERATOR_H
#define BALL_KERNEL_ATOMITERATOR_H
#ifndef BALL_KERNEL_ATOM_H
# include <BALL/KERNEL/atom.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 AtomIteratorTraits
: public CompositeIteratorTraits
{
public:
inline AtomIteratorTraits()
: CompositeIteratorTraits()
{
predicate_ = &RTTI::getDefault<KernelPredicate<Atom> >();
}
inline AtomIteratorTraits(const AtomIteratorTraits& traits)
: CompositeIteratorTraits(traits)
{
}
AtomIteratorTraits(const Composite& composite);
AtomIteratorTraits& operator = (const AtomIteratorTraits& traits);
void resetPredicate();
};
inline AtomIteratorTraits::AtomIteratorTraits(const Composite& composite)
: CompositeIteratorTraits(composite)
{
predicate_ = &RTTI::getDefault<KernelPredicate<Atom> >();
}
inline AtomIteratorTraits& AtomIteratorTraits::operator = (const AtomIteratorTraits& traits)
{
CompositeIteratorTraits::operator = (traits);
return *this;
}
inline void AtomIteratorTraits::resetPredicate()
{
predicate_ = &RTTI::getDefault<KernelPredicate<Atom> >();
}
typedef BidirectionalIterator
<Composite, Atom, Composite::CompositeIterator, AtomIteratorTraits>
AtomIterator;
typedef ConstBidirectionalIterator
<Composite, Atom, Composite::CompositeIterator, AtomIteratorTraits>
AtomConstIterator;
typedef std::reverse_iterator<AtomIterator> AtomReverseIterator;
typedef std::reverse_iterator<AtomConstIterator> AtomConstReverseIterator;
IteratorWrapper(Atom)
ConstIteratorWrapper(Atom)
} // namespace BALL
#endif // BALL_KERNEL_ATOMITERATOR_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
predicate.h
atom.h
BALL::AtomIteratorTraits
Definition atomIterator.h:34
BALL::AtomIteratorTraits::operator=
AtomIteratorTraits & operator=(const AtomIteratorTraits &traits)
Definition atomIterator.h:63
BALL::AtomIteratorTraits::AtomIteratorTraits
AtomIteratorTraits()
Definition atomIterator.h:37
BALL::AtomIteratorTraits::resetPredicate
void resetPredicate()
Definition atomIterator.h:69
BALL::AtomIteratorTraits::AtomIteratorTraits
AtomIteratorTraits(const AtomIteratorTraits &traits)
Definition atomIterator.h:43
BALL::Atom
Definition atom.h:90
BALL::BidirectionalIterator
Mutable bidirectional iterator.
Definition bidirectionalIterator.h:260
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::Composite::CompositeIterator
BidirectionalIterator< Composite, Composite, Composite *, CompositeIteratorTraits > CompositeIterator
Definition composite.h:1468
BALL::ConstBidirectionalIterator
Definition bidirectionalIterator.h:25
iterator.h
BALL::RTTI::getDefault
const T & getDefault()
Definition rtti.h:75
BALL
Definition constants.h:13
BALL::AtomIterator
BidirectionalIterator< Composite, Atom, Composite::CompositeIterator, AtomIteratorTraits > AtomIterator
Definition atomIterator.h:84
BALL::AtomConstIterator
ConstBidirectionalIterator< Composite, Atom, Composite::CompositeIterator, AtomIteratorTraits > AtomConstIterator
Definition atomIterator.h:90
BALL::AtomConstReverseIterator
std::reverse_iterator< AtomConstIterator > AtomConstReverseIterator
A constant reverse bidirectional iterator for the Atom class.
Definition atomIterator.h:96
BALL::AtomReverseIterator
std::reverse_iterator< AtomIterator > AtomReverseIterator
A mutable reverse bidirectional iterator for the Atom class.
Definition atomIterator.h:93
stdIteratorWrapper.h
ConstIteratorWrapper
#define ConstIteratorWrapper(type)
Definition stdIteratorWrapper.h:17
IteratorWrapper
#define IteratorWrapper(type)
Definition stdIteratorWrapper.h:4