Read/write List of dictionaries. More...
#include <dictionaryListEntry.H>


Public Member Functions | |
| dictionaryListEntry (const dictionaryListEntry &)=delete | |
| No copy construct. | |
| dictionaryListEntry (const dictionary &parentDict, Istream &is) | |
| Construct from the parent dictionary and Istream. | |
| dictionaryListEntry (const dictionary &parentDict, const dictionaryListEntry &dictEnt) | |
| Construct as copy for the given parent dictionary. | |
| autoPtr< entry > | clone (const dictionary &parentDict) const |
| Construct on freestore as copy with reference to the. | |
| virtual void | write (Ostream &os) const |
| Write. | |
| InfoProxy< dictionaryListEntry > | info () const noexcept |
| Return info proxy, used to print token information to a stream. | |
| Public Member Functions inherited from dictionaryEntry | |
| dictionaryEntry (const dictionaryEntry &)=delete | |
| No copy construct. | |
| dictionaryEntry (const dictionary &parentDict, Istream &is) | |
| Construct from the parent dictionary and Istream. | |
| dictionaryEntry (const keyType &key, const dictionary &parentDict, Istream &is) | |
| Construct from the keyword, parent dictionary and a Istream. | |
| dictionaryEntry (const keyType &key, const dictionary &parentDict, const dictionary &dict) | |
| Construct from the keyword, parent dictionary and a dictionary. | |
| dictionaryEntry (const dictionary &parentDict, const dictionaryEntry &dictEnt) | |
| Construct as copy for the given parent dictionary. | |
| virtual const fileName & | name () const |
| Return the scoped dictionary name (eg, dictA.dictB.dictC). | |
| virtual fileName & | name () |
| Return scoped dictionary name for modification. | |
| virtual fileName | relativeName () const |
| Return scoped dictionary name relative to the current case. | |
| virtual label | startLineNumber () const |
| Return line number of first token in dictionary. | |
| virtual label | endLineNumber () const |
| Return line number of last token in dictionary. | |
| virtual ITstream & | stream () const |
| This entry is not a primitive, calling this function generates a FatalError. | |
| virtual const dictionary * | dictPtr () const noexcept |
| Return pointer to this dictionary. | |
| virtual dictionary * | dictPtr () noexcept |
| Return non-const pointer to this dictionary. | |
| virtual const dictionary & | dict () const noexcept |
| Return dictionary (ie, this). | |
| virtual dictionary & | dict () noexcept |
| Return non-const access to dictionary. | |
| InfoProxy< dictionaryEntry > | info () const noexcept |
| Return info proxy, used to print token information to a stream. | |
| Public Member Functions inherited from entry | |
| entry (const keyType &keyword) | |
| Construct from keyword. | |
| entry (const entry &e) | |
| Construct as copy. | |
| virtual autoPtr< entry > | clone () const |
| Construct on freestore as copy. | |
| virtual | ~entry ()=default |
| Destructor. | |
| const keyType & | keyword () const noexcept |
| Return keyword. | |
| keyType & | keyword () noexcept |
| Return non-const access to keyword. | |
| virtual bool | isStream () const noexcept |
| True if this entry is a stream. | |
| virtual ITstream * | streamPtr () const noexcept |
| Return pointer to token stream, if it is a primitive entry, otherwise return nullptr. | |
| virtual bool | isDict () const noexcept |
| True if this entry is a dictionary. | |
| void | checkITstream (const ITstream &is) const |
| Check after reading if the input token stream has unconsumed tokens remaining or if there were no tokens in the first place. | |
| template<class T> | |
| T | get () const |
| Get a T from the stream, FatalIOError if the number of tokens is incorrect. | |
| template<class T> | |
| void | readEntry (T &val) const |
| Assign to T val, FatalIOError if the number of tokens is incorrect. | |
| template<class T, class Predicate> | |
| T | getCheck (const Predicate &pred) const |
| Get a T from the stream, FatalIOError if the number of tokens is incorrect. | |
| template<class T, class Predicate> | |
| void | readCheck (T &val, const Predicate &pred) const |
| Assign to T val, FatalIOError if the number of tokens is incorrect. | |
| void | operator= (const entry &e) |
| bool | operator== (const entry &e) const |
| bool | operator!= (const entry &e) const |
| Public Member Functions inherited from DLListBase::link | |
| link () noexcept=default | |
| Default construct. | |
| bool | registered () const noexcept |
| Node registered (linked) in a list? | |
| void | deregister () noexcept |
| Deregister the node (after removal). | |
| Public Member Functions inherited from dictionary | |
| ClassName ("dictionary") | |
| dictionary () | |
| Default construct, a top-level empty dictionary. | |
| dictionary (const fileName &name) | |
| Construct top-level empty dictionary with given name. | |
| dictionary (const fileName &name, const dictionary &parentDict, Istream &is, bool keepHeader=false) | |
| Construct given the entry name, parent dictionary and Istream, reading entries until EOF, optionally keeping the header. | |
| dictionary (Istream &is) | |
| Construct top-level dictionary from Istream (discards the header). Reads entries until EOF or when the first token is a '{' character, it will stop reading at the matching '}' character. | |
| dictionary (Istream &is, bool keepHeader) | |
| Construct top-level dictionary from Istream, reading entries until EOF, optionally keeping the header. | |
| dictionary (const dictionary &parentDict, const dictionary &dict) | |
| Copy construct given the parent dictionary. | |
| dictionary (const dictionary &dict) | |
| Copy construct top-level dictionary. | |
| dictionary (const dictionary *dict) | |
| Construct top-level dictionary as copy from pointer to dictionary. | |
| dictionary (const dictionary &parentDict, dictionary &&dict) | |
| Move construct for given parent dictionary. | |
| dictionary (dictionary &&dict) | |
| Move construct top-level dictionary. | |
| autoPtr< dictionary > | clone () const |
| Construct and return clone. | |
| virtual | ~dictionary () |
| Destructor. | |
| const fileName & | name () const noexcept |
| The dictionary name. | |
| fileName & | name () noexcept |
| The dictionary name for modification (use with caution). | |
| word | dictName () const |
| The local dictionary name (final part of scoped name). | |
| fileName | relativeName (const bool caseTag=false) const |
| The dictionary name relative to the case. | |
| bool | isNullDict () const noexcept |
| The dictionary is actually dictionary::null (root dictionary). | |
| const dictionary & | parent () const noexcept |
| Return the parent dictionary. | |
| const dictionary & | topDict () const |
| Return the top of the tree. | |
| label | startLineNumber () const |
| Return line number of first token in dictionary. | |
| label | endLineNumber () const |
| Return line number of last token in dictionary. | |
| SHA1Digest | digest () const |
| Return the SHA1 digest of the dictionary contents. | |
| tokenList | tokens () const |
| Return the dictionary as a list of tokens. | |
| const entry * | findEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Find an entry (const access) with the given keyword. | |
| entry * | findEntry (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
| Find an entry (non-const access) with the given keyword. | |
| bool | found (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Find an entry (const access) with the given keyword. | |
| const entry * | findScoped (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Search for a scoped entry (const access) with the given keyword. | |
| const dictionary * | findDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return a sub-dictionary pointer if present (and it is a dictionary) otherwise return nullptr. | |
| dictionary * | findDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
| Find and return a sub-dictionary pointer if present (and it is a dictionary) otherwise return nullptr. | |
| ITstream * | findStream (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return an entry stream if present (and it is a stream) otherwise return nullptr. | |
| const entry & | lookupEntry (const word &keyword, enum keyType::option matchOpt) const |
| Search for an entry (const access) with the given keyword. | |
| ITstream & | lookup (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return an entry data stream. FatalIOError if not found, or not a stream. | |
| template<class T> | |
| T | get (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect. | |
| template<class T> | |
| T | getOrDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return a T, or return the given default value. FatalIOError if it is found and the number of tokens is incorrect. | |
| template<class T> | |
| T | getOrAdd (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) |
| Find and return a T, or return the given default value and add it to dictionary. FatalIOError if it is found and the number of tokens is incorrect. | |
| template<class T> | |
| bool | readEntry (const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const |
| Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect, or it is mandatory and not found. | |
| template<class T> | |
| bool | readIfPresent (const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const |
| Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens is incorrect. | |
| template<class T, class Predicate> | |
| T | getCheck (const word &keyword, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return a T with additional checking FatalIOError if not found, or if the number of tokens is incorrect. | |
| template<class T, class Predicate> | |
| T | getCheckOrDefault (const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return a T, or return the given default value. FatalIOError if it is found and the number of tokens is incorrect. | |
| template<class T, class Predicate> | |
| T | getCheckOrAdd (const word &keyword, const T &deflt, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) |
| Find and return a T, or return the given default value and add it to dictionary. FatalIOError if it is found and the number of tokens is incorrect. | |
| template<class T, class Predicate> | |
| bool | readCheck (const word &keyword, T &val, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const |
| Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect, or it is mandatory and not found. | |
| template<class T, class Predicate> | |
| bool | readCheckIfPresent (const word &keyword, T &val, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const |
| Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens is incorrect. | |
| const dictionary & | subDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return a sub-dictionary. | |
| dictionary & | subDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
| Find and return a sub-dictionary for manipulation. | |
| dictionary & | subDictOrAdd (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
| Find and return a sub-dictionary for manipulation. | |
| dictionary | subOrEmptyDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const |
| Find and return a sub-dictionary as a copy, otherwise return an empty dictionary. | |
| const dictionary & | optionalSubDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return a sub-dictionary, otherwise return this dictionary. | |
| wordList | toc () const |
| Return the table of contents. | |
| wordList | sortedToc () const |
| Return the sorted table of contents. | |
| template<class Compare> | |
| wordList | sortedToc (const Compare &comp) const |
| Return table of contents sorted using the specified comparator. | |
| List< keyType > | keys (bool patterns=false) const |
| Return the list of available keys or patterns. | |
| bool | substituteKeyword (const word &keyword, bool mergeEntry=false) |
| Substitute the given keyword (which is prefixed by '$'). | |
| bool | substituteScopedKeyword (const word &keyword, bool mergeEntry=false) |
| Substitute the given scoped keyword (which is prefixed by '$'). | |
| entry * | add (entry *entryPtr, bool mergeEntry=false) |
| Add a new entry. | |
| entry * | add (const entry &e, bool mergeEntry=false) |
| Add an entry. | |
| entry * | add (const keyType &k, const word &v, bool overwrite=false) |
| Add a word entry. | |
| entry * | add (const keyType &k, const string &v, bool overwrite=false) |
| Add a string entry. | |
| entry * | add (const keyType &k, const label v, bool overwrite=false) |
| Add a label entry. | |
| entry * | add (const keyType &k, const scalar v, bool overwrite=false) |
| Add a scalar entry. | |
| entry * | add (const keyType &k, const dictionary &d, bool mergeEntry=false) |
| Add a dictionary entry. | |
| template<class T> | |
| entry * | add (const keyType &k, const T &v, bool overwrite=false) |
| Add a T entry. | |
| entry * | set (entry *entryPtr) |
| Assign a new entry, overwriting any existing entry. | |
| entry * | set (const entry &e) |
| Assign a new entry, overwriting any existing entry. | |
| entry * | set (const keyType &k, const dictionary &v) |
| Assign a dictionary entry, overwriting any existing entry. | |
| entry * | set (const keyType &k, std::nullptr_t) |
| Assign an empty primitive entry, overwriting any existing entry. | |
| entry * | set (const keyType &k, const UList< token > &tokens) |
| Assign a primitive entry from a list of tokens, overwriting any existing entry. | |
| entry * | set (const keyType &k, List< token > &&tokens) |
| Assign a primitive entry from a list of tokens, overwriting any existing entry. | |
| template<class T> | |
| entry * | set (const keyType &k, const T &v) |
| Assign a T entry, overwriting any existing entry. | |
| bool | remove (const word &keyword) |
| Remove an entry specified by keyword. | |
| bool | changeKeyword (const keyType &oldKeyword, const keyType &newKeyword, bool overwrite=false) |
| Change the keyword for an entry,. | |
| bool | merge (const dictionary &dict) |
| Merge entries from the given dictionary. | |
| void | clear () |
| Clear the dictionary. | |
| void | transfer (dictionary &dict) |
| Transfer the contents of the argument and annul the argument. | |
| void | checkITstream (const ITstream &is, const word &keyword) const |
| Check after reading if the input token stream has unconsumed tokens remaining or if there were no tokens in the first place. | |
| bool | read (Istream &is) |
| Read dictionary from Istream (discards the header). Reads entries until EOF or when the first token is a '{' character, it will stop reading at the matching '}' character. | |
| bool | read (Istream &is, bool keepHeader) |
| Read dictionary from Istream (optionally keeping the header) Reads entries until EOF or when the first token is a '{' character, it will stop reading at the matching '}' character. | |
| void | writeEntry (Ostream &os) const |
| Write sub-dictionary with its dictName as its header. | |
| void | writeEntry (const keyType &keyword, Ostream &os) const |
| Write sub-dictionary with the keyword as its header. | |
| void | writeEntries (Ostream &os, const bool extraNewLine=false) const |
| Write dictionary entries. | |
| void | write (Ostream &os, const bool subDict=true) const |
| Write dictionary, normally with sub-dictionary formatting. | |
| const_searcher | csearch (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Search dictionary for given keyword. | |
| const_searcher | search (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Search dictionary for given keyword. | |
| searcher | search (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) |
| Search dictionary for given keyword. | |
| const_searcher | csearchScoped (const word &keyword, enum keyType::option matchOpt) const |
| Search using scoping. | |
| const_searcher | searchScoped (const word &keyword, enum keyType::option matchOpt) const |
| Search using dot or slash scoping. | |
| searcher | searchScoped (const word &keyword, enum keyType::option matchOpt) |
| Search using dot or slash scoping. | |
| const dictionary * | cfindScopedDict (const fileName &dictPath) const |
| Locate a sub-dictionary using slash-scoping. | |
| const dictionary * | findScopedDict (const fileName &dictPath) const |
| Locate a sub-dictionary using slash-scoping. | |
| dictionary * | findScopedDict (const fileName &dictPath) |
| Locate a sub-dictionary using slash-scoping. | |
| dictionary * | makeScopedDict (const fileName &dictPath) |
| Locate existing or create sub-dictionary using slash-scoping. | |
| const_searcher | csearchCompat (const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, enum keyType::option matchOpt=keyType::REGEX) const |
| Search dictionary for given keyword and any compatibility names. | |
| const entry * | findCompat (const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, enum keyType::option matchOpt) const |
| Find and return an entry pointer if present, or return a nullptr, using any compatibility names if needed. | |
| bool | foundCompat (const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, enum keyType::option matchOpt=keyType::REGEX) const |
| Search dictionary for given keyword and any compatibility names. | |
| const entry & | lookupEntryCompat (const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, enum keyType::option matchOpt) const |
| Find and return an entry if present, otherwise FatalIOError, using any compatibility names if needed. | |
| ITstream & | lookupCompat (const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return an entry data stream, using any compatibility names if needed. | |
| template<class T> | |
| T | getCompat (const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return a T using any compatibility names if needed. FatalIOError if not found, or if there are excess tokens. | |
| template<class T> | |
| T | getOrDefaultCompat (const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const |
| Find and return a T, or return the given default value using any compatibility names if needed. | |
| template<class T> | |
| bool | readCompat (const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const |
| Find entry and assign to T val using any compatibility names if needed. FatalIOError if there are excess tokens. | |
| template<class T> | |
| bool | readIfPresentCompat (const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, T &val, enum keyType::option matchOpt=keyType::REGEX) const |
| Find an entry if present, and assign to T val using any compatibility names if needed. FatalIOError if it is found and there are excess tokens. | |
| void | operator= (const dictionary &rhs) |
| Copy assignment. | |
| void | operator+= (const dictionary &rhs) |
| Include entries from the given dictionary. | |
| void | operator|= (const dictionary &rhs) |
| Conditionally include entries from the given dictionary. | |
| void | operator<<= (const dictionary &rhs) |
| Unconditionally include entries from the given dictionary. | |
| bool | getBool (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Same as get<bool>(const word&, keyType::option). | |
| label | getLabel (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Same as get<label>(const word&, keyType::option). | |
| scalar | getScalar (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Same as get<scalar>(const word&, keyType::option). | |
| string | getString (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Same as get<string>(const word&, keyType::option). | |
| word | getWord (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Same as get<word>(const word&, keyType::option). | |
| fileName | getFileName (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Same as get<fileName>(const word&, keyType::option). | |
| bool | isDict (const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const |
| Check for existence of a sub-dictionary. Generally prefer findDict() for more flexibility. | |
| template<class T> | |
| T | lookupOrDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const |
| Same as getOrDefault(). | |
| template<class T> | |
| T | lookupOrAddDefault (const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) |
| Same as getOrAdd(). | |
| ITstream & | operator[] (const word &keyword) const |
| Deprecated(2018-07) - use lookup() method. | |
| bool | found (const word &keyword, bool recursive, bool patternMatch=true) const |
| Deprecated(2018-10). | |
| entry * | lookupEntryPtr (const word &keyword, bool recursive, bool patternMatch) |
| Deprecated(2018-10). | |
| const entry * | lookupEntryPtr (const word &keyword, bool recursive, bool patternMatch) const |
| Deprecated(2018-10). | |
| const entry * | lookupScopedEntryPtr (const word &keyword, bool recursive, bool patternMatch) const |
| Deprecated(2018-10). | |
| const dictionary * | subDictPtr (const word &keyword) const |
| Deprecated(2018-10). | |
| dictionary * | subDictPtr (const word &keyword) |
| Deprecated(2018-10) Find and return a sub-dictionary pointer if present. | |
| const entry & | lookupEntry (const word &keyword, bool recursive, bool patternMatch) const |
| Deprecated(2018-10). | |
| ITstream & | lookup (const word &keyword, bool recursive, bool patternMatch=true) const |
| Deprecated(2018-10). | |
| template<class T> | |
| T | lookupOrDefault (const word &keyword, const T &deflt, bool recursive, bool patternMatch=true) const |
| Deprecated(2018-10). | |
| template<class T> | |
| T | lookupOrAddDefault (const word &keyword, const T &deflt, bool recursive, bool patternMatch=true) |
| Deprecated(2018-10). | |
| template<class T> | |
| bool | readIfPresent (const word &keyword, T &val, bool recursive, bool patternMatch=true) const |
| Deprecated(2018-10). | |
| template<class T> | |
| T | lookupType (const word &keyword, bool recursive=false, bool patternMatch=true) const |
| Deprecated(2018-10) find and return a T. | |
| template<class Compare> | |
| Foam::wordList | sortedToc (const Compare &comp) const |
| template<class T> | |
| Foam::entry * | add (const keyType &k, const T &v, bool overwrite) |
| template<class T> | |
| Foam::entry * | set (const keyType &k, const T &v) |
| Public Member Functions inherited from ILList< DLListBase, T > | |
| ILList ()=default | |
| Default construct. | |
| ILList (T *item) | |
| Construct and add initial item pointer. | |
| ILList (Istream &is) | |
| Construct from Istream. | |
| ILList (const ILList< DLListBase, T > &lst) | |
| Copy construct using the 'clone()' method for each element. | |
| ILList (ILList< DLListBase, T > &&lst) | |
| Move construct. | |
| ILList (const ILList< DLListBase, T > &lst, const CloneArg &cloneArg) | |
| Copy constructor with additional argument for clone 'clone()'. | |
| ILList (Istream &is, const INew &inew) | |
| Construct from Istream using given Istream constructor class. | |
| ~ILList () | |
| Destructor. Calls clear(). | |
| void | clear () |
| Clear the contents of the list. | |
| void | pop_front (label n=1) |
| Remove first element(s) from the list (deletes pointers). | |
| bool | erase (T *item) |
| Remove the specified element from the list and delete it. | |
| void | transfer (ILList< DLListBase, T > &lst) |
| Transfer the contents of the argument into this List and annul the argument list. | |
| void | operator= (const ILList< DLListBase, T > &lst) |
| Copy assignment using the 'clone()' method for each element. | |
| void | operator= (ILList< DLListBase, T > &&lst) |
| Move assignment. | |
| Public Member Functions inherited from UILList< DLListBase, T > | |
| UILList ()=default | |
| Default construct. | |
| UILList (T *item) | |
| Construct and add initial item pointer. | |
| UILList (const UILList< DLListBase, T > &list) | |
| Construct as copy. | |
| T * | front () |
| The first entry in the list. | |
| const T * | front () const |
| The first entry in the list (const access). | |
| T * | back () |
| The last entry in the list. | |
| const T * | back () const |
| The last entry in the list (const access). | |
| T * | removeHead () |
| Remove and return head. | |
| T * | remove (T *item) |
| Remove and return element. | |
| T * | remove (iterator &iter) |
| Remove and return item specified by iterator. | |
| void | operator= (const UILList< DLListBase, T > &lst) |
| Copy assignment. | |
| bool | operator== (const UILList< DLListBase, T > &lst) const |
| Equality. True both lists are element-wise equal. | |
| bool | operator!= (const UILList< DLListBase, T > &lst) const |
| The opposite of the equality operation. Takes linear time. | |
| Ostream & | writeList (Ostream &os, const label shortLen=0) const |
| Write UILList with line-breaks when length exceeds shortLen. | |
| iterator | begin () |
| Iterator to first item in list with non-const access. | |
| const_iterator | cbegin () const |
| Iterator to first item in list with const access. | |
| reverse_iterator | rbegin () |
| Iterator to last item in list with non-const access. | |
| const_reverse_iterator | crbegin () const |
| Iterator to last item in list with const access. | |
| const_iterator | begin () const |
| Iterator to first item in list with const access. | |
| const_reverse_iterator | rbegin () const |
| Iterator to last item in list with const access. | |
| const iterator & | end () |
| End of list for forward iterators. | |
| const const_iterator & | cend () const |
| End of list for forward iterators. | |
| const reverse_iterator & | rend () |
| End of list for reverse iterators. | |
| const const_reverse_iterator & | crend () const |
| End of list for reverse iterators. | |
| const const_iterator & | end () const |
| End of list for forward iterators. | |
| const const_reverse_iterator & | rend () const |
| End of list for reverse iterators. | |
| T * | first () |
| The first entry in the list. | |
| const T * | first () const |
| The first entry in the list (const access). | |
| T * | last () |
| The last entry in the list. | |
| const T * | last () const |
| The last entry in the list (const access). | |
| Public Member Functions inherited from DLListBase | |
| DLListBase ()=default | |
| Default construct. | |
| DLListBase (const DLListBase &)=delete | |
| No copy construct. | |
| void | operator= (const DLListBase &)=delete |
| No copy assignment. | |
| ~DLListBase ()=default | |
| Destructor. | |
| bool | empty () const noexcept |
| True if the list is empty. | |
| label | size () const noexcept |
| The number of elements in list. | |
| link * | front () |
| Return first entry. | |
| const link * | front () const |
| Return const access to first entry. | |
| link * | back () |
| Return last entry. | |
| const link * | back () const |
| Return const access to last entry. | |
| void | push_front (link *item) |
| Add at front of list. | |
| void | push_back (link *item) |
| Add at back of list. | |
| bool | swapUp (link *item) |
| Swap this element with the one above unless it is at the top. | |
| bool | swapDown (link *item) |
| Swap this element with the one below unless it is at the bottom. | |
| link * | removeHead () |
| Remove and return first entry. | |
| link * | remove (link *item) |
| Remove and return element. | |
| link * | remove (iterator &iter) |
| Remove and return element specified by iterator. | |
| link * | replace (link *oldLink, link *newLink) |
| Replace oldLink with newLink and return element. | |
| link * | replace (iterator &oldIter, link *newitem) |
| Replace oldIter with newItem and return element. | |
| void | clear () |
| Clear the list. | |
| void | swap (DLListBase &lst) |
| Swap the contents of the list. | |
| void | transfer (DLListBase &lst) |
| Transfer the contents of the argument into this list and annul the argument list. | |
| iterator | begin () |
| Iterator to first item in list with non-const access. | |
| const_iterator | cbegin () const |
| Iterator to first item in list with const access. | |
| const_iterator | crbegin () const |
| Iterator to last item in list with const access. | |
| const iterator & | end () |
| End of list for iterators. | |
| const const_iterator & | cend () const |
| End of list for iterators. | |
| const const_iterator & | crend () const |
| End of list for reverse iterators. | |
| link * | first () |
| Return first entry. | |
| const link * | first () const |
| Return const access to first entry. | |
| link * | last () |
| Return last entry. | |
| const link * | last () const |
| Return const access to last entry. | |
| void | prepend (link *item) |
| Add at front of list. | |
| void | append (link *item) |
| Add at back of list. | |
Friends | |
| Ostream & | operator<< (Ostream &os, const dictionaryListEntry &e) |
Additional Inherited Members | |
| Public Types inherited from entry | |
| enum class | inputMode { MERGE , OVERWRITE , PROTECT , WARN , ERROR , GLOBAL } |
| The input mode options. More... | |
| Public Types inherited from dictionary | |
| typedef Searcher< true > | const_searcher |
| Searcher with const access. | |
| typedef Searcher< false > | searcher |
| Searcher with non-const access. | |
| Public Types inherited from UILList< DLListBase, T > | |
| typedef T | value_type |
| Type of values stored. | |
| typedef T * | pointer |
| Pointer for value_type. | |
| typedef const T * | const_pointer |
| Const pointer for value_type. | |
| typedef T & | reference |
| Reference for value_type. | |
| typedef const T & | const_reference |
| Const reference for value_type. | |
| typedef label | size_type |
| The type that can represent the container size. | |
| typedef label | difference_type |
| The difference between iterator objects. | |
| using | base_iterator |
| using | const_base_iterator |
| Static Public Member Functions inherited from entry | |
| static bool | New (dictionary &parentDict, Istream &is, const inputMode inpMode=inputMode::GLOBAL, const int endChar=0) |
| Construct from an Istream and insert into the dictionary. | |
| static autoPtr< entry > | New (Istream &is) |
| Construct an entry from Istream. | |
| static void | resetInputMode () |
| Reset the globalInputMode to merge. | |
| Static Public Member Functions inherited from dictionary | |
| static int | reportOptional () noexcept |
| Return the state of reporting optional (default) entries. | |
| static int | reportOptional (const int level) noexcept |
| Change the state of reporting optional (default) entries. | |
| static autoPtr< dictionary > | New (Istream &is) |
| Construct top-level dictionary on freestore from Istream. | |
| Public Attributes inherited from DLListBase::link | |
| link * | prev_ = nullptr |
| Pointer to prev entry in list. | |
| link * | next_ = nullptr |
| Pointer to next entry in list. | |
| Public Attributes inherited from dictionary | |
| friend | const_searcher |
| Declare friendship with the searcher classes. | |
| friend | searcher |
| Static Public Attributes inherited from entry | |
| static int | disableFunctionEntries |
| Enable or disable use of function entries and variable expansions. | |
| static inputMode | globalInputMode = inputMode::MERGE |
| The current global input-mode. | |
| Static Public Attributes inherited from dictionary | |
| static int | writeOptionalEntries |
| Report optional keywords and values if not present in dictionary. | |
| static const dictionary | null |
| An empty dictionary, which is also the parent for all dictionaries. | |
| static refPtr< OSstream > | reportingOutput |
| Output location when reporting default values. | |
| Protected Member Functions inherited from DLListBase | |
| template<class IteratorType> | |
| IteratorType | iterator_first () const |
| Return iterator to first item or end-iterator if list is empty. | |
| template<class IteratorType> | |
| IteratorType | iterator_last () const |
| Return iterator to last item or end-iterator if list is empty. | |
| Static Protected Member Functions inherited from entry | |
| static void | reportReadWarning (const IOstream &, const std::string &) |
| Report a read warning (on std::cerr). | |
| Static Protected Member Functions inherited from DLListBase | |
| template<class IteratorType> | |
| static const IteratorType & | iterator_end () |
| Factory method to return an iterator end. | |
| template<class IteratorType> | |
| static const IteratorType & | iterator_rend () |
| Factory method to return an iterator reverse end. | |
Read/write List of dictionaries.
The List entries get stored in a dictionary which itself is stored in the parent dictionary with keyword 'entryDDD' where DDD is the position in the parent dictionary. The printing is again in List format - the keyword is only printed as comment. Can be used to e.g. manipulate polyMesh/boundary files.
Definition at line 62 of file dictionaryListEntry.H.
|
delete |
No copy construct.
References dictionaryListEntry().
Referenced by clone(), dictionaryListEntry(), dictionaryListEntry(), and operator<<.


| dictionaryListEntry | ( | const dictionary & | parentDict, |
| Istream & | is ) |
Construct from the parent dictionary and Istream.
Definition at line 51 of file dictionaryListEntryIO.C.
References token::BEGIN_LIST, dictionaryEntry::dictionaryEntry(), token::END_LIST, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, token::info(), token::isLabel(), token::isPunctuation(), token::labelToken(), dictionaryEntry::name(), entry::New(), Foam::nl, dictionary::null, Istream::putBack(), Istream::readBeginList(), Istream::readEndList(), and realSize().

| dictionaryListEntry | ( | const dictionary & | parentDict, |
| const dictionaryListEntry & | dictEnt ) |
Construct as copy for the given parent dictionary.
Definition at line 41 of file dictionaryListEntryIO.C.
References dictionaryEntry::dictionaryEntry(), and dictionaryListEntry().

|
inlinevirtual |
Construct on freestore as copy with reference to the.
dictionary the copy belongs to
Reimplemented from dictionaryEntry.
Definition at line 92 of file dictionaryListEntry.H.
References dictionaryListEntry().

|
virtual |
Write.
Reimplemented from dictionaryEntry.
Definition at line 108 of file dictionaryListEntryIO.C.
References token::BEGIN_LIST, Foam::decrIndent(), token::END_LIST, FUNCTION_NAME, Foam::incrIndent(), Foam::indent(), entry::keyword(), Foam::nl, os(), DLListBase::size(), token::SPACE, and dictionary::write().

|
inlinenoexcept |
Return info proxy, used to print token information to a stream.
Definition at line 109 of file dictionaryListEntry.H.
References Foam::noexcept.
|
friend |
References dictionaryListEntry(), e, and os().