mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: minor code formatting
This commit is contained in:
@ -62,6 +62,7 @@ class regExp
|
||||
//- Precompiled regular expression
|
||||
mutable regex_t* preg_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
@ -72,6 +73,8 @@ class regExp
|
||||
|
||||
public:
|
||||
|
||||
// Static Member Functions
|
||||
|
||||
//- Is character a regular expression meta-character?
|
||||
// any character: '.' \n
|
||||
// quantifiers: '*', '+', '?' \n
|
||||
@ -102,13 +105,14 @@ public:
|
||||
//- Construct from std::string (or string), optionally ignoring case
|
||||
regExp(const std::string&, const bool ignoreCase=false);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~regExp();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Access
|
||||
// Access
|
||||
|
||||
//- Return true if a precompiled expression does not exist
|
||||
inline bool empty() const
|
||||
@ -129,12 +133,14 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//- Editing
|
||||
// Editing
|
||||
|
||||
//- Compile pattern into a regular expression, optionally ignoring case
|
||||
//- Compile pattern into a regular expression, optionally ignoring
|
||||
// case
|
||||
void set(const char*, const bool ignoreCase=false) const;
|
||||
|
||||
//- Compile pattern into a regular expression, optionally ignoring case
|
||||
//- Compile pattern into a regular expression, optionally ignoring
|
||||
// case
|
||||
void set(const std::string&, const bool ignoreCase=false) const;
|
||||
|
||||
|
||||
@ -143,7 +149,7 @@ public:
|
||||
bool clear() const;
|
||||
|
||||
|
||||
//- Searching
|
||||
// Searching
|
||||
|
||||
//- Find position within string.
|
||||
// Returns the index where it begins or string::npos if not found
|
||||
@ -173,7 +179,6 @@ public:
|
||||
//- Assign and compile pattern from string
|
||||
// Always case sensitive
|
||||
void operator=(const std::string&);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -110,6 +110,7 @@ public:
|
||||
//- Test string for regular expression meta characters
|
||||
static inline bool isPattern(const string&);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
@ -137,14 +138,16 @@ public:
|
||||
// Words are treated as literals, strings with an auto-test
|
||||
wordRe(Istream&);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Access
|
||||
// Access
|
||||
|
||||
//- Should be treated as a match rather than a literal string?
|
||||
inline bool isPattern() const;
|
||||
|
||||
//- Infrastructure
|
||||
|
||||
// Infrastructure
|
||||
|
||||
//- Compile the regular expression
|
||||
inline bool compile() const;
|
||||
@ -159,7 +162,8 @@ public:
|
||||
// Optionally strips invalid word characters
|
||||
inline void uncompile(const bool doStripInvalid = false) const;
|
||||
|
||||
//- Editing
|
||||
|
||||
// Editing
|
||||
|
||||
//- Copy string, auto-test for regular expression or other options
|
||||
inline void set(const std::string&, const compOption = DETECT);
|
||||
@ -170,13 +174,19 @@ public:
|
||||
//- Clear string and precompiled regular expression
|
||||
inline void clear();
|
||||
|
||||
//- Searching
|
||||
|
||||
// Searching
|
||||
|
||||
//- Smart match as regular expression or as a string
|
||||
// Optionally force a literal match only
|
||||
inline bool match(const std::string&, bool literalMatch=false) const;
|
||||
inline bool match
|
||||
(
|
||||
const std::string&,
|
||||
bool literalMatch = false
|
||||
) const;
|
||||
|
||||
//- Miscellaneous
|
||||
|
||||
// Miscellaneous
|
||||
|
||||
//- Return a string with quoted meta-characters
|
||||
inline string quotemeta() const;
|
||||
|
||||
Reference in New Issue
Block a user