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 |
Return 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 |
![]() | |
constexpr | List () noexcept |
Default construct. 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 Foam::zero) | |
Construct with given size initializing all elements to zero. More... | |
List (const Foam::one, const wordRe &val) | |
Construct with length=1, copying the value as the only content. More... | |
List (const Foam::one, wordRe &&val) | |
Construct with length=1, moving the value as the only content. More... | |
List (const Foam::one, const Foam::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 (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 | clear () |
Clear the list, i.e. set size to zero. More... | |
void | resize (const label len) |
Adjust allocated size of list. More... | |
void | resize (const label len, const wordRe &val) |
Adjust allocated size of list and set val for new elements. More... | |
void | resize (const label newLen) |
void | resize_nocopy (const label len) |
Adjust allocated size of list without necessarily. More... | |
void | setSize (const label n) |
Alias for resize() More... | |
void | setSize (const label n, const wordRe &val) |
Alias for resize() 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... | |
label | appendUniq (const wordRe &val) |
Append an element if not already in the 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 Foam::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... | |
Istream & | readList (Istream &is) |
Read List from Istream, discarding contents of existing List. More... | |
Istream & | readList (Istream &is) |
Istream & | readList (Istream &is) |
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 const List< wordRe > & | null () |
Return a null List. More... | |
Additional Inherited Members | |
![]() | |
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 and regular expressions.
Definition at line 32 of file wordRes.C.
References Foam::BitOps::count(), forAll, Foam::input(), and Foam::output().
Referenced by ensightWrite::read(), and sampledMeshedSurface::sampledMeshedSurface().
void uniq | ( | ) |
Filter out duplicate entries (inplace).
No distinction made between literals and regular expressions.
Definition at line 70 of file wordRes.C.
References Foam::BitOps::count(), forAll, Foam::input(), and Foam::output().
Smart match as literal or regex, stopping on the first match.
literal | Force literal match only. |
Definition at line 91 of file wordResI.H.
Referenced by cellTable::combine(), dictionaryContent::copyDict(), namesList< solutionEntry >::findNames(), ZoneMesh< cellZone, polyMesh >::indices(), polyBoundaryMesh::indices(), boundaryRegion::names(), cellTable::names(), polyBoundaryMesh::patchSet(), multiRegion::read(), Cloud< passivePositionParticle >::readFromFiles(), 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 98 of file wordResI.H.
Referenced by dictionaryContent::copyDict().
Return list indices for all matches.
input | A list of string inputs to match against |
invert | invert the matching logic |
Referenced by ensightMesh::correct(), PatchParticleHistogram< CloudType >::PatchParticleHistogram(), and PatchPostProcessing< CloudType >::PatchPostProcessing().
|
inline |
Identical to match(), for use as a predicate.
Definition at line 132 of file wordResI.H.
|
inline |
Definition at line 106 of file wordResI.H.
References Foam::BitOps::count(), Foam::input(), Foam::invert(), Foam::stringOps::match(), and List< T >::resize().