A tuple of keyType and dictionary, which can be used when reading named or unnamed dictionary entries or simply a name. More...


Public Member Functions | |
| namedDictionary ()=default | |
| Default construct. More... | |
| namedDictionary (Istream &is) | |
| Construct from Istream. More... | |
| ~namedDictionary ()=default | |
| Destructor. More... | |
| void | clear () |
| Clear keyword and dictionary. More... | |
| bool | empty () const noexcept |
| Empty if both keyword and dictionary are empty. More... | |
| const keyType & | keyword () const noexcept |
| Return keyword. More... | |
| keyType & | keyword () noexcept |
| Return non-const access to keyword. More... | |
| const dictionary & | dict () const noexcept |
| Read-access to the dictionay. More... | |
| dictionary & | dict () noexcept |
| Write access to the dictionay. More... | |
Public Member Functions inherited from Tuple2< keyType, dictionary > | |
| Tuple2 ()=default | |
| Default construct. More... | |
| Tuple2 (const keyType &f, const dictionary &s) | |
| Copy construct from components. More... | |
| Tuple2 (keyType &&f, dictionary &&s) | |
| Move construct from components. More... | |
| Tuple2 (const std::pair< keyType, dictionary > &vals) | |
| Copy construct from std::pair. More... | |
| Tuple2 (std::pair< keyType, dictionary > &&vals) | |
| Move construct from std::pair. More... | |
| Tuple2 (Istream &is) | |
| Construct from Istream. More... | |
| const keyType & | first () const noexcept |
| Access the first element. More... | |
| keyType & | first () noexcept |
| Access the first element. More... | |
| const dictionary & | second () const noexcept |
| Access the second element. More... | |
| dictionary & | second () noexcept |
| Access the second element. More... | |
Friends | |
| Istream & | operator>> (Istream &, namedDictionary &) |
| Ostream & | operator<< (Ostream &, const namedDictionary &) |
Additional Inherited Members | |
Public Types inherited from Tuple2< keyType, dictionary > | |
| typedef keyType | first_type |
| Type of member first, the first template parameter (T1) More... | |
| typedef dictionary | second_type |
| Type of member second, the second template parameter (T2) More... | |
A tuple of keyType and dictionary, which can be used when reading named or unnamed dictionary entries or simply a name.
fields
(
U
T { relax false; }
);
The namedDictionary can also be used in situations where an individual dictionary entry should be read. The keyword() and dict() methods correspond to Foam::entry naming conventions.
actions
(
testing { action new; ... } // An action with a name
{ action subset; } // Unnamed action
);
Normal dictionary reading would fail for this type of input since the leading 'testing' keyword would cause the entire content to be considered a single dictionary.
Definition at line 81 of file namedDictionary.H.
|
default |
Default construct.
|
explicit |
Construct from Istream.
Definition at line 26 of file namedDictionary.C.
|
default |
Destructor.
| void clear | ( | ) |
Clear keyword and dictionary.
Definition at line 34 of file namedDictionary.C.
Referenced by Foam::operator>>().

|
noexcept |
Empty if both keyword and dictionary are empty.
Definition at line 41 of file namedDictionary.C.
|
inlinenoexcept |
Return keyword.
Definition at line 126 of file namedDictionary.H.
References Tuple2< keyType, dictionary >::first().
Referenced by Foam::operator<<(), and Foam::operator>>().


|
inlinenoexcept |
Return non-const access to keyword.
Definition at line 131 of file namedDictionary.H.
References Tuple2< keyType, dictionary >::first().

|
inlinenoexcept |
Read-access to the dictionay.
Definition at line 136 of file namedDictionary.H.
References Tuple2< keyType, dictionary >::second().
Referenced by Foam::operator<<(), and Foam::operator>>().


|
inlinenoexcept |
Write access to the dictionay.
Definition at line 141 of file namedDictionary.H.
References Tuple2< keyType, dictionary >::second().

|
friend |
|
friend |