Rev | Line | |
---|
[699] | 1 | |
---|
| 2 | #include "BBCEntityDistribution.h" |
---|
| 3 | |
---|
| 4 | namespace BBC { |
---|
| 5 | |
---|
[721] | 6 | EntityDistribution::EntityDistribution(): references(0) // initialize references to 0 |
---|
[699] | 7 | { |
---|
[721] | 8 | } |
---|
| 9 | |
---|
| 10 | EntityDistribution::~EntityDistribution() |
---|
| 11 | { |
---|
| 12 | mEntityList.clear(); |
---|
| 13 | } |
---|
| 14 | |
---|
| 15 | EntityPtr EntityDistribution::getEntity(unsigned unsigned int value) |
---|
| 16 | { |
---|
[699] | 17 | return mEntityList[value]; |
---|
| 18 | } |
---|
| 19 | |
---|
[721] | 20 | void EntityDistribution::addEntity(EntityPtr value) |
---|
[699] | 21 | { |
---|
| 22 | mEntityList.push_back(value); |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | void EntityDistribution::removeEntity(unsigned int value) |
---|
| 26 | { |
---|
| 27 | mEntityList.erase(mEntityList.begin()+value); |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | unsigned int EntityDistribution::getNumEntities(void) |
---|
| 31 | { |
---|
[721] | 32 | return mEntityList.size(); |
---|
[699] | 33 | } |
---|
| 34 | |
---|
| 35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.