00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_KERNEL_ATOMCONTAINERITERATOR_H
00008 #define BALL_KERNEL_ATOMCONTAINERITERATOR_H
00009
00010 #ifndef BALL_KERNEL_ITERATOR_H
00011 # include <BALL/KERNEL/iterator.h>
00012 #endif
00013
00014 #ifndef BALL_KERNEL_PREDICATE_H
00015 # include <BALL/KERNEL/predicate.h>
00016 #endif
00017
00018 namespace BALL
00019 {
00020 class AtomContainer;
00021
00026 class BALL_EXPORT AtomContainerIteratorTraits
00027 : public CompositeIteratorTraits
00028 {
00029 public:
00030
00031 inline AtomContainerIteratorTraits();
00032
00033 AtomContainerIteratorTraits(const Composite& composite);
00034
00035 inline AtomContainerIteratorTraits(const AtomContainerIteratorTraits& traits);
00036
00037 AtomContainerIteratorTraits& operator = (const AtomContainerIteratorTraits& traits);
00038
00039 void resetPredicate();
00040 };
00041
00042
00043 inline AtomContainerIteratorTraits::AtomContainerIteratorTraits()
00044 : CompositeIteratorTraits()
00045 {
00046 predicate_ = &RTTI::getDefault<KernelPredicate<AtomContainer> >();
00047 }
00048
00049 inline AtomContainerIteratorTraits::AtomContainerIteratorTraits(const Composite& composite)
00050 : CompositeIteratorTraits(composite)
00051 {
00052 predicate_ = &RTTI::getDefault<KernelPredicate<AtomContainer> >();
00053 }
00054
00055 inline AtomContainerIteratorTraits::AtomContainerIteratorTraits(const AtomContainerIteratorTraits& traits)
00056 : CompositeIteratorTraits(traits)
00057 {
00058 }
00059
00060 inline
00061 AtomContainerIteratorTraits& AtomContainerIteratorTraits::operator =
00062 (const AtomContainerIteratorTraits& traits)
00063 {
00064 CompositeIteratorTraits::operator=(traits);
00065 return *this;
00066 }
00067
00068 inline
00069 void AtomContainerIteratorTraits::resetPredicate()
00070 {
00071 predicate_ = &RTTI::getDefault<KernelPredicate<AtomContainer> >();
00072 }
00073
00074
00079
00082 typedef BidirectionalIterator
00083 <Composite, AtomContainer, Composite::CompositeIterator, AtomContainerIteratorTraits>
00084 AtomContainerIterator;
00085
00088 typedef ConstBidirectionalIterator
00089 <Composite, AtomContainer, Composite::CompositeIterator, AtomContainerIteratorTraits>
00090 AtomContainerConstIterator;
00091
00093 typedef std::reverse_iterator<AtomContainerIterator> AtomContainerReverseIterator;
00094
00096 typedef std::reverse_iterator<AtomContainerConstIterator> AtomContainerConstReverseIterator;
00097
00099 }
00100
00101 #endif // BALL_KERNEL_ATOMCONTAINERITERATOR_H