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

Go to the source code of this file.

Namespaces

 stdFoam
 Global macros and templates used by OpenFOAM and some standard C++ headers.
 
 Foam
 Namespace for OpenFOAM.
 
 Foam::Detail
 Implementation details for various OpenFOAM classes.
 
 Foam::Module
 Additional OpenFOAM modules.
 

Macros

#define FOAM_DEPRECATED(since)
 
#define FOAM_DEPRECATED_FOR(since, replacement)
 
#define forAllIters(container, iter)
 Iterate across all elements in the container object. More...
 
#define forAllConstIters(container, iter)
 Iterate across all elements of the container object with const access. More...
 
#define forAllReverseIters(container, iter)
 Reverse iterate across elements in the container object of type. More...
 
#define forAllConstReverseIters(container, iter)
 Reverse iterate across elements of container object with const access. More...
 
#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. More...
 
#define forAllConstIter(Container, container, iter)
 Iterate across all elements in the container object. More...
 

Functions

template<class C >
constexpr auto begin (C &c) -> decltype(c.begin())
 Return iterator to the beginning of the container c. More...
 
template<class C >
constexpr auto begin (const C &c) -> decltype(c.begin())
 Return const_iterator to the beginning of the container c. More...
 
template<class C >
constexpr auto cbegin (const C &c) -> decltype(c.begin())
 Return const_iterator to the beginning of the container c. More...
 
template<class C >
constexpr auto end (C &c) -> decltype(c.end())
 Return iterator to the end of the container c. More...
 
template<class C >
constexpr auto end (const C &c) -> decltype(c.end())
 Return const_iterator to the end of the container c. More...
 
template<class C >
constexpr auto cend (const C &c) -> decltype(c.end())
 Return const_iterator to the end of the container c. More...
 
template<class C >
constexpr auto rbegin (C &c) -> decltype(c.rbegin())
 Return reverse_iterator to the reverse-begin of container c. More...
 
template<class C >
constexpr auto rbegin (const C &c) -> decltype(c.rbegin())
 Return const_reverse_iterator to the reverse-begin of container c. More...
 
template<class C >
constexpr auto crbegin (const C &c) -> decltype(c.rbegin())
 Return const_reverse_iterator to the reverse-begin of container c. More...
 
template<class C >
constexpr auto rend (C &c) -> decltype(c.rend())
 Return reverse_iterator to reverse-end of container c. More...
 
template<class C >
constexpr auto rend (const C &c) -> decltype(c.rend())
 Return const_reverse_iterator to reverse-end of container c. More...
 
template<class C >
constexpr auto crend (const C &c) -> decltype(c.rend())
 Return const_reverse_iterator to reverse-end of container c. More...
 
template<class T >
constexpr const Tmin (const T &a, const T &b)
 Return the lesser of the parameters. More...
 
template<class T >
constexpr const Tmax (const T &a, const T &b)
 Return the greater of the parameters. More...
 

Detailed Description

Original source file stdFoam.H

Definition in file stdFoam.H.

Macro Definition Documentation

◆ FOAM_DEPRECATED

#define FOAM_DEPRECATED (   since)

Definition at line 65 of file stdFoam.H.

◆ FOAM_DEPRECATED_FOR

#define FOAM_DEPRECATED_FOR (   since,
  replacement 
)

Definition at line 66 of file stdFoam.H.

◆ forAllIters

#define forAllIters (   container,
  iter 
)
Value:
for \
( \
auto iter = stdFoam::begin(container); \
iter != stdFoam::end(container); \
++iter \
)

Iterate across all elements in the container object.

Usage
forAllIters(container, iter)
{
statements;
}
See also
forAllConstIters, forAllIter, forAllConstIters

Definition at line 223 of file stdFoam.H.

◆ forAllConstIters

#define forAllConstIters (   container,
  iter 
)
Value:
for \
( \
auto iter = stdFoam::cbegin(container); \
iter != stdFoam::cend(container); \
++iter \
)

Iterate across all elements of the container object with const access.

Usage
forAllConstIters(container, iter)
{
statements;
}
See also
forAllIters, forAllIter, forAllConstIter

Definition at line 241 of file stdFoam.H.

◆ forAllReverseIters

#define forAllReverseIters (   container,
  iter 
)
Value:
for \
( \
auto iter = stdFoam::rbegin(container); \
iter != stdFoam::rend(container); \
++iter \
)

Reverse iterate across elements in the container object of type.

Container.

Usage
forAllReverseIters(container, iter)
{
statements;
}
See also
forAllConstReverseIters

Definition at line 260 of file stdFoam.H.

◆ forAllConstReverseIters

#define forAllConstReverseIters (   container,
  iter 
)
Value:
for \
( \
auto iter = stdFoam::crbegin(container); \
iter != stdFoam::crend(container); \
++iter \
)

Reverse iterate across elements of container object with const access.

Usage
forAllReverseConstIters(container, iter)
{
statements;
}
See also
forAllReverseIters

Definition at line 278 of file stdFoam.H.

◆ forAll

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

Loop across all elements in list.

Usage
forAll(anyList, i)
{
statements;
}
See also
forAllReverse

Definition at line 296 of file stdFoam.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;
}
See also
forAll

Definition at line 309 of file stdFoam.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
forAllIter(ContainerType, container, iter)
{
statements;
}
See also
forAllConstIter

Definition at line 325 of file stdFoam.H.

◆ forAllConstIter

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

Iterate across all elements in the container object.

of type Container with const access.

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

Definition at line 344 of file stdFoam.H.

forAllIter
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object.
Definition: stdFoam.H:325
stdFoam::crend
constexpr auto crend(const C &c) -> decltype(c.rend())
Return const_reverse_iterator to reverse-end of container c.
Definition: stdFoam.H:188
stdFoam::begin
constexpr auto begin(C &c) -> decltype(c.begin())
Return iterator to the beginning of the container c.
Definition: stdFoam.H:97
stdFoam::begin
constexpr auto begin(const C &c) -> decltype(c.begin())
Return const_iterator to the beginning of the container c.
Definition: stdFoam.H:105
forAllConstIter
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object.
Definition: stdFoam.H:344
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
stdFoam::crbegin
constexpr auto crbegin(const C &c) -> decltype(c.rbegin())
Return const_reverse_iterator to the reverse-begin of container c.
Definition: stdFoam.H:164
stdFoam::end
constexpr auto end(const C &c) -> decltype(c.end())
Return const_iterator to the end of the container c.
Definition: stdFoam.H:129
forAllIters
#define forAllIters(container, iter)
Iterate across all elements in the container object.
Definition: stdFoam.H:223
stdFoam::end
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
Definition: stdFoam.H:121
stdFoam::rbegin
constexpr auto rbegin(C &c) -> decltype(c.rbegin())
Return reverse_iterator to the reverse-begin of container c.
Definition: stdFoam.H:148
stdFoam::cend
constexpr auto cend(const C &c) -> decltype(c.end())
Return const_iterator to the end of the container c.
Definition: stdFoam.H:137
forAllConstIters
forAllConstIters(mixture.phases(), phase)
Definition: pEqn.H:28
stdFoam::cbegin
constexpr auto cbegin(const C &c) -> decltype(c.begin())
Return const_iterator to the beginning of the container c.
Definition: stdFoam.H:113
forAllReverseIters
#define forAllReverseIters(container, iter)
Reverse iterate across elements in the container object of type.
Definition: stdFoam.H:260
forAllReverse
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Definition: stdFoam.H:309
stdFoam::rend
constexpr auto rend(C &c) -> decltype(c.rend())
Return reverse_iterator to reverse-end of container c.
Definition: stdFoam.H:172