|
|
|
DynamicList Class Template ReferenceInheritance diagram for DynamicList:![]() ![]() Detailed Descriptiontemplate<class T, unsigned SizeInc = 0, unsigned SizeMult = 2, unsigned SizeDiv = 1>
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| DynamicList () | |
| Construct null. | |
| DynamicList (const label) | |
| Construct given size. | |
| DynamicList (const UList< T > &) | |
| Construct from UList. nextFree_ set to size(). | |
| DynamicList (Istream &) | |
| Construct from Istream. nextFree_ set to size(). | |
| label | size () const |
| Size of the active part of the list. | |
| void | setSize (const label) |
| Reset size of List. | |
| void | setSize (const label, const T &) |
| Reset size of List and value for new elements. | |
| void | clear () |
| Clear the list, i.e. set next free to zero. | |
| DynamicList< T, SizeInc, SizeMult, SizeDiv > & | shrink () |
| Shrink the List<T> to the number of elements used. | |
| void | transfer (List< T > &) |
| Transfer the contents of the argument List into this List. | |
| void | transfer (DynamicList< T, SizeInc, SizeMult, SizeDiv > &) |
| Transfer the contents of the argument DynamicList into this. | |
| void | append (const T &e) |
| Append an element at the end of the list. | |
| T | remove () |
| Return and remove the top element. | |
| T & | operator() (const label) |
| Return non-const access to an element,. | |
| void | operator= (const T &) |
| Assignment of all entries to the given value. | |
| void | operator= (const List< T > &) |
| Assignment to List<T>. | |
Friends | |
| Ostream & | operator (Ostream &, const DynamicList< T, SizeInc, SizeMult, SizeDiv > &) |
| Istream & | operator>> (Istream &, DynamicList< T, SizeInc, SizeMult, SizeDiv > &) |
| Read from Istream, discarding contents of existing DynamicList. | |
| DynamicList | ( | ) | [inline] |
| DynamicList | ( | const | label | ) | [inline, explicit] |
| DynamicList | ( | const UList< T > & | ) | [inline, explicit] |
| DynamicList | ( | Istream & | ) | [explicit] |
| Foam::label size | ( | ) | const [inline] |
Size of the active part of the list.
Direct over-ride of list size member function
Reimplemented from UList.
Definition at line 70 of file DynamicListI.H.
| void setSize | ( | const | label | ) | [inline] |
| void setSize | ( | const | label, | |
| const T & | ||||
| ) | [inline] |
Reset size of List and value for new elements.
Reimplemented from List.
Definition at line 96 of file DynamicListI.H.
| void clear | ( | ) | [inline] |
Clear the list, i.e. set next free to zero.
Allocated size does not change
Reimplemented from List.
Definition at line 114 of file DynamicListI.H.
| Foam::DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink | ( | ) | [inline] |
Shrink the List<T> to the number of elements used.
Definition at line 122 of file DynamicListI.H.
References FatalErrorIn, and UList::size().
Here is the call graph for this function:

| void transfer | ( | List< T > & | ) | [inline] |
Transfer the contents of the argument List into this List.
and annull the argument list. Is same as List::transfer except checks that you're not changing the underlying list to something smaller than nextFree_.
Reimplemented from List.
Definition at line 131 of file DynamicListI.H.
| void transfer | ( | DynamicList< T, SizeInc, SizeMult, SizeDiv > & | ) | [inline] |
Transfer the contents of the argument DynamicList into this.
DynamicList and annull the argument list.
Definition at line 154 of file DynamicListI.H.
| void append | ( | const T & | e | ) | [inline] |
| T remove | ( | ) | [inline] |
| T & operator() | ( | const | label | ) | [inline] |
Return non-const access to an element,.
resizing the list if necessary
Definition at line 193 of file DynamicListI.H.
References Foam::max().
Here is the call graph for this function:

| void operator= | ( | const T & | ) | [inline] |
Assignment of all entries to the given value.
Reimplemented from List.
Definition at line 217 of file DynamicListI.H.
| void operator= | ( | const List< T > & | ) | [inline] |
| 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.