|
|
|
DynamicList< T, SizeInc, SizeMult, SizeDiv > Class Template ReferenceA 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects. More...
Inheritance diagram for DynamicList< T, SizeInc, SizeMult, SizeDiv >:
![]()
Collaboration diagram for DynamicList< T, SizeInc, SizeMult, SizeDiv >:
![]()
Detailed Descriptiontemplate<class T, unsigned SizeInc = 0, unsigned SizeMult = 2, unsigned SizeDiv = 1>
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DynamicList | ( | ) | [inline] |
| DynamicList | ( | const label | nElem | ) | [inline, explicit] |
| DynamicList | ( | const DynamicList< T, SizeInc, SizeMult, SizeDiv > & | lst | ) | [inline, explicit] |
| DynamicList | ( | const UList< T > & | lst | ) | [inline, explicit] |
Construct from UList. Size set to UList size.
Also constructs from DynamicList with different sizing parameters.
Definition at line 57 of file DynamicListI.H.
| DynamicList | ( | const UIndirectList< T > & | lst | ) | [inline, explicit] |
Construct from UIndirectList. Size set to UIndirectList size.
Definition at line 68 of file DynamicListI.H.
| DynamicList | ( | const Xfer< List< T > > & | lst | ) | [inline, explicit] |
| DynamicList | ( | Istream & | is | ) | [inline, explicit] |
| Foam::label capacity | ( | ) | const [inline] |
| void setCapacity | ( | const label | nElem | ) | [inline] |
Alter the size of the underlying storage.
The addressed size will be truncated if needed to fit, but will remain otherwise untouched. Use this or reserve() in combination with append().
Definition at line 101 of file DynamicListI.H.
| void setSize | ( | const label | nElem | ) | [inline] |
Alter the addressed list size.
New space will be allocated if required. Use this to resize the list prior to using the operator[] for setting values (as per List usage).
Reimplemented from List< T >.
Definition at line 159 of file DynamicListI.H.
Referenced by DynamicList< T, SizeInc, SizeMult, SizeDiv >::clear(), and DynamicList< T, SizeInc, SizeMult, SizeDiv >::resize().

| void setSize | ( | const label | nElem, | |
| const T & | t | |||
| ) | [inline] |
Alter the addressed list size and fill new space with a constant.
Reimplemented from List< T >.
Definition at line 196 of file DynamicListI.H.
| void resize | ( | const label | nElem | ) | [inline] |
Alter the addressed list size.
New space will be allocated if required. Use this to resize the list prior to using the operator[] for setting values (as per List usage).
Reimplemented from List< T >.
Definition at line 214 of file DynamicListI.H.
References UList< T >::operator[]().

| void resize | ( | const label | nElem, | |
| const T & | t | |||
| ) | [inline] |
Alter the addressed list size and fill new space with a constant.
Reimplemented from List< T >.
Definition at line 224 of file DynamicListI.H.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::setSize().

| void reserve | ( | const label | nElem | ) | [inline] |
Reserve allocation space for at least this size.
Never shrinks the allocated size, use setCapacity() for that.
Definition at line 122 of file DynamicListI.H.
| void clear | ( | ) | [inline] |
Clear the addressed list, i.e. set the size to zero.
Allocated size does not change
Reimplemented from List< T >.
Definition at line 234 of file DynamicListI.H.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::setSize().
Referenced by Particle< ParticleType >::findFaces(), and DynamicList< T, SizeInc, SizeMult, SizeDiv >::shrink().


| void clearStorage | ( | ) | [inline] |
Clear the list and delete storage.
Definition at line 241 of file DynamicListI.H.
References List< T >::size().

| Foam::DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink | ( | ) | [inline] |
Shrink the allocated space to the number of elements used.
Returns a reference to the DynamicList.
Definition at line 250 of file DynamicListI.H.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::clear().
Referenced by boundaryMesh::getNearest(), and Foam::parseNASCoord().


| void transfer | ( | List< T > & | lst | ) | [inline] |
Transfer contents of the argument List into this DynamicList.
Reimplemented from List< T >.
Definition at line 269 of file DynamicListI.H.
Referenced by DynamicList< T, SizeInc, SizeMult, SizeDiv >::transfer().

| void transfer | ( | DynamicList< T, SizeInc, SizeMult, SizeDiv > & | lst | ) | [inline] |
Transfer contents of the argument DynamicList into this DynamicList.
Reimplemented from List< T >.
Definition at line 279 of file DynamicListI.H.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::transfer().

| Foam::Xfer< Foam::List< T > > xfer | ( | ) | [inline] |
Transfer contents to the Xfer container as a plain List.
Reimplemented from List< T >.
Definition at line 293 of file DynamicListI.H.
Referenced by Foam::parseNASCoord().

| void append | ( | const T & | t | ) | [inline] |
Append an element at the end of the list.
Definition at line 301 of file DynamicListI.H.
Referenced by primitiveMesh::cellEdges(), fileName::components(), Particle< ParticleType >::findFaces(), FreeStream< CloudType >::FreeStream(), boundaryMesh::getNearest(), and Foam::parseNASCoord().

| void append | ( | const UList< T > & | lst | ) | [inline] |
Append a List at the end of this list.
Reimplemented from List< T >.
Definition at line 314 of file DynamicListI.H.
| void append | ( | const UIndirectList< T > & | lst | ) | [inline] |
Append a UIndirectList at the end of this list.
Reimplemented from List< T >.
Definition at line 339 of file DynamicListI.H.
References UList< T >::operator[]().

| T remove | ( | ) | [inline] |
Remove and return the top element.
Definition at line 354 of file DynamicListI.H.
References UList< T >::operator[]().

| T & operator() | ( | const label | elemI | ) | [inline] |
Return non-const access to an element, resizing list if necessary.
Definition at line 378 of file DynamicListI.H.
| void operator= | ( | const T & | t | ) | [inline] |
Assignment of all addressed entries to the given value.
Reimplemented from List< T >.
Definition at line 393 of file DynamicListI.H.
| void operator= | ( | const DynamicList< T, SizeInc, SizeMult, SizeDiv > & | lst | ) | [inline] |
| void operator= | ( | const UList< T > & | lst | ) | [inline] |
Assignment from UList.
Reimplemented from List< T >.
Definition at line 403 of file DynamicListI.H.
References UList< T >::operator=().

friend class List< T > [friend] |
Declare friendship with the List class.
Reimplemented from UList< T >.
Definition at line 88 of file DynamicList.H.
| Ostream& operator | ( | Ostream & | , | |
| const DynamicList< T, SizeInc, SizeMult, SizeDiv > & | ||||
| ) | [friend] |
| Istream& operator>> | ( | Istream & | , | |
| DynamicList< T, SizeInc, SizeMult, SizeDiv > & | ||||
| ) | [friend] |
Read from Istream, discarding contents of existing DynamicList.