13 #ifndef ESYS_LSMGRAINCOLLECTION_H
14 #define ESYS_LSMGRAINCOLLECTION_H
16 #include "Foundation/StlIterator.h"
17 #include <boost/shared_ptr.hpp>
18 #include <boost/pool/object_pool.hpp>
29 template <
typename TmplGrain>
33 typedef TmplGrain Grain;
34 typedef typename Grain::Particle Particle;
35 typedef typename Grain::ParticleCollection ParticleCollection;
36 typedef typename ParticleCollection::ParticlePool ParticlePool;
37 typedef typename ParticleCollection::ParticlePoolPtr ParticlePoolPtr;
40 typedef boost::object_pool<Grain> GrainPool;
41 typedef boost::shared_ptr<GrainPool> GrainPoolPtr;
42 typedef std::vector<Grain *> GrainVector;
53 typedef Grain& value_type;
61 return *(VectorIterator::next());
64 value_type current()
const
66 return *(VectorIterator::current());
73 typedef const Grain& value_type;
86 return *(VectorConstIterator::next());
89 value_type current()
const
91 return *(VectorConstIterator::current());
99 GrainCollection(ParticlePoolPtr particlePoolPtr, GrainPoolPtr grainPoolPtr);
148 ParticlePoolPtr getParticlePoolPtr();
150 GrainPoolPtr getGrainPoolPtr();
153 ParticlePoolPtr m_particlePoolPtr;
154 GrainPoolPtr m_grainPoolPtr;
155 GrainVector m_grainVector;
160 #include "Geometry/GrainCollection.hpp"