UList.H File Reference
Include dependency graph for UList.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UList< T >
 A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscript bounds checking, etc. More...
 
class  UList< T >::less
 Less function class that can be used for sorting. More...
 
class  UList< T >::greater
 Greater function class that can be used for sorting. More...
 

Namespaces

 Foam
 Namespace for OpenFOAM.
 

Macros

#define forAll(list, i)    for (Foam::label i=0; i<(list).size(); i++)
 Loop across all elements in list. More...
 
#define forAllReverse(list, i)    for (Foam::label i=(list).size()-1; i>=0; i--)
 Reverse loop across all elements in list. More...
 
#define forAllIter(Container, container, iter)
 Iterate across all elements in the container object of type. More...
 
#define forAllConstIter(Container, container, iter)
 Iterate across all elements in the container object of type. More...
 

Typedefs

typedef UList< label > labelUList
 

Functions

template<class T >
void writeEntry (Ostream &os, const UList< T > &)
 
template<class T >
Ostream & operator<< (Ostream &, const UList< T > &)
 
template<class T >
Istream & operator>> (Istream &, UList< T > &)
 
template<class T >
void sort (UList< T > &)
 
template<class T , class Cmp >
void sort (UList< T > &, const Cmp &)
 
template<class T >
void stableSort (UList< T > &)
 
template<class T , class Cmp >
void stableSort (UList< T > &, const Cmp &)
 
template<class T >
void reverse (UList< T > &, const label n)
 
template<class T >
void reverse (UList< T > &)
 
template<class ListType >
void writeListEntry (Ostream &os, const ListType &l)
 
template<class ListType >
void writeListEntries (Ostream &os, const ListType &l)
 
template<class ListType >
void writeListEntries (Ostream &os, const word &keyword, const ListType &l)
 

Detailed Description

Original source file UList.H

Definition in file UList.H.

Macro Definition Documentation

◆ forAll

#define forAll (   list,
 
)     for (Foam::label i=0; i<(list).size(); i++)

Loop across all elements in list.

Usage
forAll(anyList, i)
{
statements;
}
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:434
See also
forAllReverse

Definition at line 434 of file UList.H.

◆ forAllReverse

#define forAllReverse (   list,
 
)     for (Foam::label i=(list).size()-1; i>=0; i--)

Reverse loop across all elements in list.

Usage
forAllReverse(anyList, i)
{
statements;
}
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Definition: UList.H:446
See also
forAll

Definition at line 446 of file UList.H.

◆ forAllIter

#define forAllIter (   Container,
  container,
  iter 
)
Value:
for \
( \
Container::iterator iter = (container).begin(); \
iter != (container).end(); \
++iter \
)

Iterate across all elements in the container object of type.

Container.

Usage
forAll(ContainerType, container, iter)
{
statements;
}
See also
forAllConstIter

Definition at line 459 of file UList.H.

◆ forAllConstIter

#define forAllConstIter (   Container,
  container,
  iter 
)
Value:
for \
( \
Container::const_iterator iter = (container).begin(); \
iter != (container).end(); \
++iter \
)

Iterate across all elements in the container object of type.

Container with const access.

Usage
forAllConstIter(ContainerType, container, iter)
{
statements;
}
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Definition: UList.H:477
See also
forAllIter

Definition at line 477 of file UList.H.