Object registry for simpleRegIOobject. Maintains ordering. More...
#include <simpleObjectRegistry.H>


Public Member Functions | |
| simpleObjectRegistry ()=default | |
| Default construct: empty without allocation (capacity=0). | |
| simpleObjectRegistry (const label initialCapacity) | |
| Construct empty with initial table capacity. | |
| void | setValues (const dictionary &dict, bool verbose=false, bool dryrun=false) |
| Set values (invoke callbacks) from dictionary entries. | |
| void | setNamedValue (const std::string_view name, int val, bool verbose=false, bool dryrun=false) |
| Set named value, but also handle embedded 'name=value' syntax. | |
| void | setNamedInt (const std::string_view name, int val, bool verbose=false) |
| Deprecated(2021-09) renamed to setNamedValue. | |
| Public Member Functions inherited from Dictionary< simpleObjectRegistryEntry > | |
| Dictionary (const label initialCapacity=128) | |
| Default construct, or with initial table capacity. | |
| bool | erase (const word &keyword) |
| Remove an entry specified by keyword and delete the pointer. | |
| Public Member Functions inherited from DictionaryBase< IDLList< simpleObjectRegistryEntry >, simpleObjectRegistryEntry > | |
| DictionaryBase ()=default | |
| Default construct: empty without allocation (capacity=0). | |
| bool | contains (const word &keyword) const |
| Search for given keyword. | |
| const simpleObjectRegistryEntry * | cfind (const word &keyword) const |
| Find and return an entry, nullptr on failure. | |
| simpleObjectRegistryEntry * | find (const word &keyword) |
| Find and return an entry, nullptr on failure. | |
| const simpleObjectRegistryEntry * | lookup (const word &keyword) const |
| Find and return entry, FatalError on failure. | |
| wordList | toc () const |
| The table of contents (as a sorted list). | |
| wordList | sortedToc () const |
| The table of contents as a sorted list. | |
| void | push_front (const word &keyword, simpleObjectRegistryEntry *ptr) |
| Add to front of dictionary. | |
| void | push_back (const word &keyword, simpleObjectRegistryEntry *ptr) |
| Add to back of dictionary. | |
| simpleObjectRegistryEntry * | remove (const word &keyword) |
| Remove and return entry specified by keyword. | |
| void | clear () |
| Clear the dictionary. | |
| void | transfer (DictionaryBase< IDLList< simpleObjectRegistryEntry >, simpleObjectRegistryEntry > &dict) |
| Transfer the contents of the argument into this DictionaryBase. | |
| void | operator= (const DictionaryBase &) |
| Copy assignment. | |
| const simpleObjectRegistryEntry * | operator[] (const word &key) const |
| Find and return entry. | |
| bool | found (const word &key) const |
| Same as contains(). | |
| const simpleObjectRegistryEntry * | lookupPtr (const word &k) const |
| Deprecated(2020-03) use cfind(). | |
| void | insert (const word &k, simpleObjectRegistryEntry *ptr) |
| Add to front of dictionary. | |
| void | prepend (const word &k, simpleObjectRegistryEntry *ptr) |
| Add to front of dictionary. | |
| void | append (const word &k, simpleObjectRegistryEntry *ptr) |
| Add to back of dictionary. | |
| 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. | |
Additional Inherited Members | |
| Public Types inherited from Dictionary< simpleObjectRegistryEntry > | |
| typedef DictionaryBase< IDLList< simpleObjectRegistryEntry >, simpleObjectRegistryEntry > | dict_type |
| The template instance used for the dictionary content. | |
| 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 |
| Protected Member Functions inherited from DictionaryBase< IDLList< simpleObjectRegistryEntry >, simpleObjectRegistryEntry > | |
| bool | addHashEntry (const word &key, simpleObjectRegistryEntry *ptr) |
| Add an entry to the HashTable. | |
| void | addEntries () |
| Add the IDLListType entries into the HashTable. | |
| 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 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. | |
| Protected Attributes inherited from DictionaryBase< IDLList< simpleObjectRegistryEntry >, simpleObjectRegistryEntry > | |
| HashTable< simpleObjectRegistryEntry * > | hashedTs_ |
| HashTable of the entries held on the IDLListType for quick lookup. | |
Object registry for simpleRegIOobject. Maintains ordering.
Definition at line 82 of file simpleObjectRegistry.H.
|
default |
Default construct: empty without allocation (capacity=0).
|
inlineexplicit |
Construct empty with initial table capacity.
Definition at line 98 of file simpleObjectRegistry.H.
References Dictionary< simpleObjectRegistryEntry >::Dictionary().

| void setValues | ( | const dictionary & | dict, |
| bool | verbose = false, | ||
| bool | dryrun = false ) |
Set values (invoke callbacks) from dictionary entries.
Reporting honours the infoDetailLevel
| verbose | Report changes to Info (respects infoDetailLevel) |
| dryrun | Report requested changes only, but do not effect them |
Definition at line 31 of file simpleObjectRegistry.C.
References dict, DictionaryBase< IDLList< simpleObjectRegistryEntry >, simpleObjectRegistryEntry >::find(), Foam::Info, Foam::infoDetailLevel, Foam::name(), Foam::nl, os(), ISpanStream::reset(), and ISpanStream::rewind().
Referenced by Time::readDict().


| void setNamedValue | ( | const std::string_view | name, |
| int | val, | ||
| bool | verbose = false, | ||
| bool | dryrun = false ) |
Set named value, but also handle embedded 'name=value' syntax.
Treats 'name=' and 'name' identically. Also accepts a floating point value (and even strings), but the called objects need to handle those.
| verbose | Report changes to Info (respects infoDetailLevel) |
| dryrun | Report requested changes only, but do not effect them |
Definition at line 103 of file simpleObjectRegistry.C.
References DictionaryBase< IDLList< simpleObjectRegistryEntry >, simpleObjectRegistryEntry >::find(), Foam::Info, Foam::infoDetailLevel, Foam::name(), Foam::nl, and Foam::readInt().
Referenced by argList::argList(), and setNamedInt().


|
inline |
Deprecated(2021-09) renamed to setNamedValue.
Definition at line 142 of file simpleObjectRegistry.H.
References Foam::name(), and setNamedValue().
