This class describes a combination of target object index and success flag. Behaves somewhat like std::optional. More...
Public Member Functions | |
| constexpr | objectHit () noexcept |
| Default construct. Nothing hit and object index = -1. More... | |
| objectHit (const bool success, const label index) noexcept | |
| Construct from components. More... | |
| objectHit (Istream &is) | |
| Construct from Istream. More... | |
| bool | hit () const noexcept |
| Is there a hit? More... | |
| label | index () const noexcept |
| Return the hit object index. More... | |
| label | hitObject () const noexcept |
| Identical to index() More... | |
| void | reset () noexcept |
| Reset to default construct state (false, -1) More... | |
| void | setHit () noexcept |
| Set the hit status on. More... | |
| void | setMiss () noexcept |
| Set the hit status off. More... | |
| void | setIndex (const label index) noexcept |
| Set the hit object index. More... | |
Friends | |
| Ostream & | operator<< (Ostream &os, const objectHit &obj) |
This class describes a combination of target object index and success flag. Behaves somewhat like std::optional.
Definition at line 48 of file objectHit.H.
|
inlinenoexcept |
Default construct. Nothing hit and object index = -1.
Definition at line 70 of file objectHit.H.
|
inlinenoexcept |
Construct from components.
Definition at line 79 of file objectHit.H.
Construct from Istream.
Definition at line 88 of file objectHit.H.
|
inlinenoexcept |
Is there a hit?
Definition at line 102 of file objectHit.H.
Referenced by Foam::operator<<(), and Foam::operator==().

|
inlinenoexcept |
Return the hit object index.
Definition at line 110 of file objectHit.H.
Referenced by Foam::operator<<(), Foam::operator==(), and objectHit::setIndex().

|
inlinenoexcept |
Identical to index()
Definition at line 118 of file objectHit.H.
|
inlinenoexcept |
Reset to default construct state (false, -1)
Definition at line 129 of file objectHit.H.
|
inlinenoexcept |
Set the hit status on.
Definition at line 138 of file objectHit.H.
|
inlinenoexcept |
Set the hit status off.
Definition at line 146 of file objectHit.H.
|
inlinenoexcept |
Set the hit object index.
Definition at line 154 of file objectHit.H.
References objectHit::index().

Definition at line 162 of file objectHit.H.