Generic const/non-const dictionary entry searcher. More...
#include <dictionary.H>

Public Types | |
| using | dict_type |
| The const/non-const type for the context and sub-dictionaries. | |
| using | value_type |
| The const/non-const type for entries. | |
| using | dict_pointer = dict_type* |
| A pointer to a const/non-const dictionary. | |
| using | dict_reference = dict_type& |
| A reference to a const/non-const dictionary. | |
| using | pointer = value_type* |
| A pointer to a const/non-const entry. | |
| using | reference = value_type& |
| A reference to a const/non-const entry. | |
Public Member Functions | |
| constexpr | Searcher () noexcept |
| Default construct. | |
| bool | good () const noexcept |
| True if entry was found. | |
| bool | found () const noexcept |
| True if entry was found. | |
| dict_reference | context () const |
| The containing dictionary context. | |
| pointer | ptr () const noexcept |
| A pointer to the entry (nullptr if not found). | |
| reference | ref () const |
| A reference to the entry (Error if not found). | |
| bool | isDict () const noexcept |
| True if found entry is a dictionary. | |
| bool | isStream () const noexcept |
| True if found entry is a stream. | |
| dict_pointer | dictPtr () const noexcept |
| Pointer to the found entry as a dictionary, nullptr otherwise. | |
| ITstream * | streamPtr () const noexcept |
| Pointer to the found entry as a stream, nullptr otherwise. | |
| dict_reference | dict () const |
| Return the found entry as a dictionary. Error if not found, or not a dictionary. | |
| ITstream & | stream () const |
| Return the found entry as a ITstream. Error if not found, or not a stream. | |
| operator const Searcher<!Const > & () const | |
| Permit an explicit cast to the other (const/non-const) searcher. | |
| pointer | operator-> () const noexcept |
| A pointer to the entry (nullptr if not found). | |
| reference | operator* () const |
| A reference to the entry (Error if not found). | |
Public Attributes | |
| friend | dictionary |
Protected Member Functions | |
| Searcher (dict_pointer dict) noexcept | |
| Implicit construct for the given dictionary context. | |
| void | set (pointer eptr) noexcept |
| Assign the entry. | |
Protected Attributes | |
| dict_pointer | dict_ |
| The dictionary context for the entry. | |
| pointer | eptr_ |
| The entry or nullptr. | |
Generic const/non-const dictionary entry searcher.
A searcher provides a uniform means of finding and returning an entry pointer as well as the dictionary context in which the entry was located.
Note that the constructors and set methods are protected such that only friends of the class can set things. This safeguards against inconsistencies in context/entry.
Definition at line 150 of file dictionary.H.
| using dict_type |
The const/non-const type for the context and sub-dictionaries.
Definition at line 158 of file dictionary.H.
| using value_type |
The const/non-const type for entries.
Definition at line 164 of file dictionary.H.
| using dict_pointer = dict_type* |
A pointer to a const/non-const dictionary.
Definition at line 170 of file dictionary.H.
| using dict_reference = dict_type& |
A reference to a const/non-const dictionary.
Definition at line 175 of file dictionary.H.
| using pointer = value_type* |
A pointer to a const/non-const entry.
Definition at line 180 of file dictionary.H.
| using reference = value_type& |
A reference to a const/non-const entry.
Definition at line 185 of file dictionary.H.
|
inlineprotectednoexcept |
Implicit construct for the given dictionary context.
Definition at line 204 of file dictionary.H.
|
inlineconstexprnoexcept |
Default construct.
Definition at line 224 of file dictionary.H.
|
inlineprotectednoexcept |
Assign the entry.
Definition at line 213 of file dictionary.H.
Referenced by dictionary::csearch().

|
inlinenoexcept |
True if entry was found.
Definition at line 234 of file dictionary.H.
Referenced by dictionary::csearchCompat(), dictionary::optionalSubDict(), dictionary::subDict(), dictionary::subDict(), dictionary::subDictOrAdd(), dictionary::subOrEmptyDict(), and dictionary::substituteKeyword().

|
inlinenoexcept |
True if entry was found.
Definition at line 241 of file dictionary.H.
|
inline |
The containing dictionary context.
Definition at line 246 of file dictionary.H.
|
inlinenoexcept |
A pointer to the entry (nullptr if not found).
Definition at line 251 of file dictionary.H.
|
inline |
A reference to the entry (Error if not found).
Definition at line 256 of file dictionary.H.
|
inlinenoexcept |
True if found entry is a dictionary.
Definition at line 261 of file dictionary.H.
|
inlinenoexcept |
True if found entry is a stream.
Definition at line 269 of file dictionary.H.
|
inlinenoexcept |
Pointer to the found entry as a dictionary, nullptr otherwise.
Definition at line 277 of file dictionary.H.
Referenced by dictionary::optionalSubDict(), dictionary::set(), dictionary::subDictOrAdd(), and dictionary::subOrEmptyDict().

|
inlinenoexcept |
Pointer to the found entry as a stream, nullptr otherwise.
Definition at line 285 of file dictionary.H.
|
inline |
Return the found entry as a dictionary. Error if not found, or not a dictionary.
Definition at line 294 of file dictionary.H.
Referenced by dictionary::subDict(), dictionary::subDict(), and dictionary::substituteKeyword().

|
inline |
Return the found entry as a ITstream. Error if not found, or not a stream.
Definition at line 300 of file dictionary.H.
Permit an explicit cast to the other (const/non-const) searcher.
Definition at line 305 of file dictionary.H.
A pointer to the entry (nullptr if not found).
Definition at line 313 of file dictionary.H.
A reference to the entry (Error if not found).
Definition at line 318 of file dictionary.H.
| friend dictionary |
Definition at line 153 of file dictionary.H.
|
protected |
The dictionary context for the entry.
Definition at line 193 of file dictionary.H.
|
protected |
The entry or nullptr.
Definition at line 198 of file dictionary.H.