Public Member Functions | |
| exprString ()=default | |
| Construct null. More... | |
| exprString (const exprString &rhs)=default | |
| Copy construct. More... | |
| exprString (exprString &&rhs)=default | |
| Move construct. More... | |
| exprString (const std::string &s, bool doValidate=true) | |
| Copy construct from std::string. More... | |
| exprString (std::string &&s, bool doValidate=true) | |
| Move construct from std::string. More... | |
| exprString (const char *s, bool doValidate=true) | |
| Construct as copy of character array. More... | |
| exprString (const std::string &str, const dictionary &dict, const bool stripComments=true) | |
| exprString (std::string &&str, const dictionary &dict, const bool stripComments=true) | |
| exprString (Istream &is, const dictionary &dict, const bool stripComments=true) | |
| ~exprString ()=default | |
| Destructor. More... | |
| exprString & | expand (const dictionary &dict, const bool stripComments=true) |
| bool | valid () const |
| Check for unexpanded '$' entries. Fatal if any exist. More... | |
| exprString & | operator= (const exprString &str)=default |
| Copy assign. More... | |
| exprString & | operator= (exprString &&str)=default |
| Move assign. More... | |
| exprString & | operator= (const char *str) |
| Copy assign from c-string. No expansions, no comment stripping. More... | |
| exprString & | operator= (const std::string &str) |
| Copy assign from string. No expansions, no comment stripping. More... | |
| exprString & | operator= (std::string &&str) |
| Move assign from string. No expansions, no comment stripping. More... | |
Public Member Functions inherited from string | |
| string ()=default | |
| Construct null. More... | |
| string (const std::string &str) | |
| Copy construct from std::string. More... | |
| string (std::string &&str) | |
| Move construct from std::string. More... | |
| string (const char *str) | |
| Construct as copy of character array. More... | |
| string (const char *str, const size_type len) | |
| Construct as copy with a maximum number of characters. More... | |
| string (const char c) | |
| Construct from a single character. More... | |
| string (const size_type len, const char c) | |
| Construct fill copies of a single character. More... | |
| string (Istream &is) | |
| Construct from Istream. More... | |
| bool | match (const std::string &text) const |
| Test for equality. More... | |
| string & | replace (const std::string &s1, const std::string &s2, size_type pos=0) |
| string & | replaceAll (const std::string &s1, const std::string &s2, size_type pos=0) |
| string & | replaceAny (const std::string &s1, const char c2, size_type pos=0) |
| string & | expand (const bool allowEmpty=false) |
| bool | removeRepeated (const char character) |
| Remove repeated characters. More... | |
| bool | removeStart (const std::string &text) |
| Remove the given text from the start of the string. More... | |
| bool | removeStart (const char c) |
| Remove leading character, unless string is a single character. More... | |
| bool | removeEnd (const std::string &text) |
| Remove the given text from the end of the string. More... | |
| bool | removeEnd (const char c) |
| Remove trailing character, unless string is a single character. More... | |
| void | swap (std::string &str) |
| Swap contents. Self-swapping is a no-op. More... | |
| bool | operator() (const std::string &text) const |
| Test for equality. Allows use as a predicate. More... | |
| bool | starts_with (const std::string &s) const |
| True if string starts with the given prefix (cf. C++20) More... | |
| bool | starts_with (const char c) const |
| True if string starts with the given character (cf. C++20) More... | |
| bool | ends_with (const std::string &s) const |
| True if string ends with the given suffix (cf. C++20) More... | |
| bool | ends_with (const char c) const |
| True if string ends with the given character (cf. C++20) More... | |
| size_type | count (const char c) const |
| bool | startsWith (const std::string &s) const |
| Deprecated(2019-11) More... | |
| bool | endsWith (const std::string &s) const |
| Deprecated(2019-11) More... | |
| bool | removeTrailing (const char c) |
| Deprecated(2019-11) More... | |
| template<class String > | |
| Foam::string | quotemeta (const std::string &str, const char quote) |
Static Public Member Functions | |
| static void | inplaceExpand (std::string &str, const dictionary &dict, const bool stripComments=true) |
| static exprString | getExpression (const word &name, const dictionary &dict, const bool stripComments=false) |
| static exprString | toExpr (const std::string &str) |
| Copy convert string to exprString. More... | |
| static exprString | toExpr (std::string &&str) |
| Move convert string to exprString. More... | |
Static Public Member Functions inherited from string | |
| template<class String > | |
| static bool | valid (const std::string &str) |
| Does the string contain valid characters only? More... | |
| template<class String > | |
| static bool | meta (const std::string &str, const char quote='\\') |
| Does this string contain meta-characters? More... | |
| template<class String > | |
| static bool | stripInvalid (std::string &str) |
| Strip invalid characters from the given string. More... | |
| template<class String > | |
| static String | validate (const std::string &str) |
| Return a valid String from the given string. More... | |
| template<class String > | |
| static string | quotemeta (const std::string &str, const char quote='\\') |
| Return a String with quoted meta-characters from the given string. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from string | |
| static const char *const | typeName = "string" |
| The type name "string". More... | |
| static int | debug |
| The debug flag. More... | |
| static const string | null |
| An empty string. More... | |
Protected Member Functions inherited from string | |
| std::string::size_type | find_ext () const |
| Find position of a file extension dot, return npos on failure. More... | |
| word | ext () const |
| Return file name extension (part after last .) More... | |
| bool | ext (const word &ending) |
| Append a '.' and the ending. More... | |
| bool | hasPath () const |
| Return true if it contains a '/' character. More... | |
| bool | hasExt () const |
| Return true if it has an extension or simply ends with a '.'. More... | |
| bool | hasExt (const word &ending) const |
| Return true if the extension is the same as the given ending. More... | |
| bool | hasExt (const wordRe &ending) const |
| Return true if the extension matches the given ending. More... | |
| bool | removeExt () |
| Remove extension, returning true if string changed. More... | |
| bool | removePath () |
| Remove leading path, returning true if string changed. More... | |
Static Protected Member Functions inherited from string | |
| static std::string::size_type | find_ext (const std::string &str) |
| Find position of a file extension dot, return npos on failure. More... | |
| template<class PrimitiveType > | |
| static std::string::size_type | string_printf (std::string &output, const char *fmt, const PrimitiveType &val) |
| A printf-style formatter for a primitive. More... | |
| template<class PrimitiveType > | |
| static std::string::size_type | string_printf (std::string &output, const std::string &fmt, const PrimitiveType &val) |
| A printf-style formatter for a primitive. More... | |
Definition at line 60 of file exprString.H.
|
default |
Construct null.
|
default |
Copy construct.
|
default |
Move construct.
|
inlineexplicit |
Copy construct from std::string.
Definition at line 34 of file exprStringI.H.
|
inlineexplicit |
Move construct from std::string.
Definition at line 51 of file exprStringI.H.
|
inlineexplicit |
Construct as copy of character array.
Definition at line 68 of file exprStringI.H.
|
inline |
Copy construct and expand with dictionary variables, and strip C/C++ comments from the input
Definition at line 85 of file exprStringI.H.
References dict, Foam::stringOps::expand(), and Foam::stringOps::removeComments().
|
inline |
Move construct and expand with dictionary variables, and strip C/C++ comments from the input
Definition at line 98 of file exprStringI.H.
References dict, Foam::stringOps::expand(), and Foam::stringOps::removeComments().
|
inline |
Construct from Istream and expand with dictionary variables, and strip C/C++ comments from the input
Definition at line 111 of file exprStringI.H.
References dict, Foam::stringOps::expand(), and Foam::stringOps::removeComments().
|
default |
Destructor.
|
static |
Inplace expansion with dictionary variables, and strip C/C++ comments from the input.
Definition at line 35 of file exprString.C.
References dict, Foam::stringOps::inplaceExpand(), and Foam::stringOps::inplaceRemoveComments().
|
static |
Get and expand expression with dictionary entries, optionally strip C/C++ comments from the input.
Expansion behaviour as per inplaceExpand
Definition at line 52 of file exprString.C.
References dict, Foam::stringOps::inplaceExpand(), and Foam::name().
|
inlinestatic |
Copy convert string to exprString.
No expansions, know what you are doing.
Definition at line 143 of file exprStringI.H.
Referenced by exprDriver::addVariables().
|
inlinestatic |
Move convert string to exprString.
No expansions, know what you are doing.
Definition at line 154 of file exprStringI.H.
| Foam::expressions::exprString & expand | ( | const dictionary & | dict, |
| const bool | stripComments = true |
||
| ) |
Inplace expansion with dictionary variables, and strip C/C++ comments from the input
Definition at line 74 of file exprString.C.
References dict, and Foam::stringOps::inplaceExpand().
|
inline |
Check for unexpanded '$' entries. Fatal if any exist.
Definition at line 125 of file exprStringI.H.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::ListOps::find(), and Foam::nl.
|
default |
Copy assign.
|
default |
Move assign.
|
inline |
Copy assign from c-string. No expansions, no comment stripping.
Definition at line 167 of file exprStringI.H.
|
inline |
Copy assign from string. No expansions, no comment stripping.
Definition at line 180 of file exprStringI.H.
|
inline |
Move assign from string. No expansions, no comment stripping.
Definition at line 193 of file exprStringI.H.