mobility: Add GetSize() method to ListPositionAllocator

This commit is contained in:
Tom Henderson
2017-03-31 16:12:49 -07:00
parent 1cff3b7f12
commit aed9cae83a
2 changed files with 14 additions and 0 deletions

View File

@@ -87,6 +87,12 @@ ListPositionAllocator::AssignStreams (int64_t stream)
return 0;
}
uint32_t
ListPositionAllocator::GetSize (void) const
{
return m_positions.size ();
}
NS_OBJECT_ENSURE_REGISTERED (GridPositionAllocator);
TypeId

View File

@@ -83,6 +83,14 @@ public:
* \param v the position to append at the end of the list of positions to return from GetNext.
*/
void Add (Vector v);
/**
* Return the number of positions stored. Note that this will not change
* based on calling GetNext(), as the number of positions is not altered
* by calling GetNext ().
*
* \return the number of positions stored
*/
uint32_t GetSize (void) const;
virtual Vector GetNext (void) const;
virtual int64_t AssignStreams (int64_t stream);
private: