00001
00011 #ifndef AUGMENTEDSPATIALPOPULATION_H
00012 #define AUGMENTEDSPATIALPOPULATION_H
00013
00014 #include "SpatialFamilyPopulation.h"
00015 #include "SimObjectAttributes.h"
00016
00017
00018 class PopObjectAttributeFactory;
00019
00030 class AugmentedSpatialPopulation : public SpatialFamilyPopulation
00031 {
00032 public:
00033
00035
00046 AugmentedSpatialPopulation(SimNetwork & net,
00047 vector< shared_ptr<PopObjectAttributeFactory> > const& families,
00048 SpatialFamilyIDGenerator const& fidgen,
00049 shared_ptr<Point3DSet> locs );
00050
00051
00053
00060 AugmentedSpatialPopulation(SimNetwork & net,
00061 shared_ptr<PopObjectAttributeFactory> family,
00062 shared_ptr<Point3DSet> locs);
00063
00065
00070 AugmentedSpatialPopulation(vector< shared_ptr<AugmentedSpatialPopulation> > const& pops);
00071
00073 virtual ~AugmentedSpatialPopulation();
00074
00076 SimObjectAttributes const& getAttributesAt( Point3D<double> const& p ) const;
00077
00079 SimObjectAttributes const& getAttributesAt( double const& x, double const& y, double const& z) const;
00080
00082 SimObjectAttributes const& getAttributes( size_t index ) const;
00083
00084
00085
00086
00087 protected:
00088
00090 AugmentedSpatialPopulation(SimNetwork *net,
00091 vector<SimObject::ID::Packed> const& objIDs,
00092 vector<familyid_t> const& famIDs,
00093 vector<shared_ptr<SimObjectAttributes> > const& attrs,
00094
00095 shared_ptr<Point3DSet> locs );
00096
00098 virtual AugmentedSpatialPopulation* new_subset( vector< size_t > const& indices ) const;
00099
00101 void populate( vector< shared_ptr<PopObjectAttributeFactory> > const& families );
00102
00103 private:
00105 vector< shared_ptr<SimObjectAttributes> > attributes;
00106 };
00107
00108 #endif