A List of wordRe with additional matching capabilities. More...
Classes | |
| struct | matcher |
| Functor wrapper for matching against a List of wordRe. More... | |
Public Member Functions | |
| ~wordRes ()=default | |
| Destructor. More... | |
| void | uniq () |
| Filter out duplicate entries (inplace). More... | |
| bool | match (const std::string &text, bool literal=false) const |
| Smart match as literal or regex, stopping on the first match. More... | |
| wordRe::compOption | matched (const std::string &text) const |
| Smart match in the list of matchers, returning the match type. More... | |
| template<class StringType > | |
| labelList | matching (const UList< StringType > &input, const bool invert=false) const |
| Extract list indices for all matches. More... | |
| bool | operator() (const std::string &text) const |
| Identical to match(), for use as a predicate. More... | |
| template<class StringType > | |
| Foam::labelList | matching (const UList< StringType > &input, const bool invert) const |
Public Member Functions inherited from List< wordRe > | |
| constexpr | List () noexcept |
| Null constructor. More... | |
| List (const label len) | |
| Construct with given size. More... | |
| List (const label len, const wordRe &val) | |
| Construct with given size and value for all elements. More... | |
| List (const label len, const zero) | |
| Construct with given size initializing all elements to zero. More... | |
| List (const one, const wordRe &val) | |
| Construct with length=1, copying the value as the only content. More... | |
| List (const one, wordRe &&val) | |
| Construct with length=1, moving the value as the only content. More... | |
| List (const one, const zero) | |
| Construct with length=1, initializing content to zero. More... | |
| List (const List< wordRe > &a) | |
| Copy construct from list. More... | |
| List (const UList< wordRe > &a) | |
| Copy construct contents from list. More... | |
| List (List< wordRe > &a, bool reuse) | |
| Construct as copy or re-use as specified. More... | |
| List (const UList< wordRe > &list, const labelUList &indices) | |
| Copy construct subset of list. More... | |
| List (const UList< wordRe > &list, const FixedList< label, N > &indices) | |
| Copy construct subset of list. More... | |
| List (InputIterator begIter, InputIterator endIter) | |
| Construct given begin/end iterators. More... | |
| List (const FixedList< wordRe, N > &list) | |
| Construct as copy of FixedList<T, N> More... | |
| List (const PtrList< wordRe > &list) | |
| Construct as copy of PtrList<T> More... | |
| List (const SLList< wordRe > &list) | |
| Construct as copy of SLList<T> More... | |
| List (const IndirectListBase< wordRe, Addr > &list) | |
| Construct as copy of IndirectList contents. More... | |
| List (std::initializer_list< wordRe > list) | |
| Construct from an initializer list. More... | |
| List (List< wordRe > &&list) | |
| Move construct from List. More... | |
| List (DynamicList< wordRe, SizeMin > &&list) | |
| Move construct from DynamicList. More... | |
| List (SortableList< wordRe > &&list) | |
| Move construct from SortableList. More... | |
| List (SLList< wordRe > &&list) | |
| Move construct from SLList. More... | |
| List (Istream &is) | |
| Construct from Istream. More... | |
| autoPtr< List< wordRe > > | clone () const |
| Clone. More... | |
| ~List () | |
| Destructor. More... | |
| void | resize (const label newSize) |
| Adjust allocated size of list. More... | |
| void | resize (const label newSize, const wordRe &val) |
| Adjust allocated size of list and set val for new elements. More... | |
| void | resize (const label newSize) |
| void | setSize (const label newSize) |
| Alias for resize(const label) More... | |
| void | setSize (const label newSize, const wordRe &val) |
| Alias for resize(const label, const T&) More... | |
| void | clear () |
| Clear the list, i.e. set size to zero. More... | |
| void | append (const wordRe &val) |
| Append an element at the end of the list. More... | |
| void | append (wordRe &&val) |
| Move append an element at the end of the list. More... | |
| void | append (const UList< wordRe > &list) |
| Append a List to the end of this list. More... | |
| void | append (const IndirectListBase< wordRe, Addr > &list) |
| Append IndirectList contents at the end of this list. More... | |
| void | transfer (List< wordRe > &list) |
| void | transfer (DynamicList< wordRe, SizeMin > &list) |
| void | transfer (SortableList< wordRe > &list) |
| wordRe & | newElmt (const label i) |
| void | operator= (const UList< wordRe > &a) |
| Assignment to UList operator. Takes linear time. More... | |
| void | operator= (const List< wordRe > &list) |
| Assignment operator. Takes linear time. More... | |
| void | operator= (const SLList< wordRe > &list) |
| Assignment to SLList operator. Takes linear time. More... | |
| void | operator= (const IndirectListBase< wordRe, Addr > &list) |
| Assignment from IndirectList. Takes linear time. More... | |
| void | operator= (const FixedList< wordRe, N > &list) |
| Copy assignment from FixedList. More... | |
| void | operator= (std::initializer_list< wordRe > list) |
| Assignment to an initializer list. More... | |
| void | operator= (const wordRe &val) |
| Assignment of all entries to the given value. More... | |
| void | operator= (const zero) |
| Assignment of all entries to zero. More... | |
| void | operator= (List< wordRe > &&list) |
| Move assignment. Takes constant time. More... | |
| void | operator= (DynamicList< wordRe, SizeMin > &&list) |
| Move assignment. Takes constant time. More... | |
| void | operator= (SortableList< wordRe > &&list) |
| Move assignment. Takes constant time. More... | |
| void | operator= (SLList< wordRe > &&list) |
| Move assignment. Takes constant time. More... | |
| void | shallowCopy (const UList< wordRe > &)=delete |
| No shallowCopy permitted. More... | |
| std::enable_if< std::is_same< bool, TypeT >::value, bool >::type | set (const label i, bool val=true) |
| A bitSet::set() method for a list of bool. More... | |
Static Public Member Functions | |
| static const wordRes & | null () |
| Return a null wordRes - a reference to the NullObject. More... | |
| static wordRes | uniq (const UList< wordRe > &input) |
| Return a wordRes with duplicate entries filtered out. More... | |
Static Public Member Functions inherited from List< wordRe > | |
| static const List< wordRe > & | null () |
| Return a null List. More... | |
Additional Inherited Members | |
Public Types inherited from List< wordRe > | |
| typedef SubList< wordRe > | subList |
| Declare type of subList. More... | |
|
default |
Destructor.
|
inlinestatic |
Return a null wordRes - a reference to the NullObject.
Definition at line 30 of file wordResI.H.
|
static |
Return a wordRes with duplicate entries filtered out.
No distinction made between literals or regular expressions.
Definition at line 32 of file wordRes.C.
References Foam::BitOps::count(), UList< T >::find(), forAll, and UList< T >::size().
Referenced by ensightWrite::read(), and sampledMeshedSurface::sampledMeshedSurface().
| void uniq | ( | ) |
Filter out duplicate entries (inplace).
No distinction made between literals or regular expressions.
Definition at line 70 of file wordRes.C.
References Foam::BitOps::count(), forAll, and List< T >::resize().
Smart match as literal or regex, stopping on the first match.
| literal | Force literal match only. |
Definition at line 87 of file wordResI.H.
Referenced by cellTable::combine(), namesList< solutionEntry >::findNames(), boundaryRegion::names(), cellTable::names(), and particle< Type >::writeProperty().
|
inline |
Smart match in the list of matchers, returning the match type.
It stops if there is a literal match, or continues to examine other regexs.
Definition at line 94 of file wordResI.H.
Extract list indices for all matches.
| input | A list of string inputs to match against |
| invert | invert the matching logic |
Referenced by ensightMesh::correct(), and PatchPostProcessing< CloudType >::PatchPostProcessing().
|
inline |
Identical to match(), for use as a predicate.
Definition at line 128 of file wordResI.H.
|
inline |
Definition at line 102 of file wordResI.H.
References Foam::BitOps::count(), Foam::invert(), Foam::stringOps::match(), List< T >::resize(), and UList< T >::size().