STYLE: adjust deprecations for OSspecific

- skip processing OSspecific/MSwindows since this can cause duplicate
  doxygen entries

STYLE: adjust formatting in code templates

STYLE: use std::string methods without extra qualifications
This commit is contained in:
Mark Olesen 2019-12-13 11:08:12 +01:00
parent 370c8a39af
commit b61d4ab488
8 changed files with 57 additions and 68 deletions

View File

@ -816,7 +816,8 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE =
# Avoid duplicate entries that would arise from OSspecific/MSwindows
EXCLUDE = $(WM_PROJECT_DIR)/src/OSspecific/MSwindows
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded

View File

@ -62,7 +62,7 @@ class CLASSNAME
:
public baseClassName
{
// Private data
// Private Data
//- Description of data_
dataType data_;
@ -79,12 +79,24 @@ class CLASSNAME
public:
// Static data members
// Static Data Members
//- Static data staticData
static const dataType staticData;
// Generated Methods
// //- Construct null
// CLASSNAME() = default;
//
// //- Copy construct
// CLASSNAME(const CLASSNAME&) = default;
//
// //- Copy assignment
// CLASSNAME& operator=(const CLASSNAME&) = default;
// Constructors
//- Construct null
@ -112,13 +124,13 @@ public:
// Member Functions
// Access
// Access
// Check
// Check
// Edit
// Edit
// Write
// Write
// Member Operators

View File

@ -67,7 +67,7 @@ class CLASSNAME
:
public baseClassName
{
// Private data
// Private Data
dataType data_;
@ -83,11 +83,22 @@ class CLASSNAME
public:
// Static data members
// Static Data Members
//- Static data someStaticData
static const dataType staticData;
// Generated Methods
// //- Construct null
// CLASSNAME() = default;
//
// //- Copy construct
// CLASSNAME(const CLASSNAME&) = default;
//
// //- Copy assignment
// CLASSNAME& operator=(const CLASSNAME&) = default;
// Constructors

View File

@ -159,14 +159,6 @@ public:
friend Istream& operator>>(Istream& is, fileStat& fs);
friend Ostream& operator<<(Ostream& os, const fileStat& fs);
// Housekeeping
//- Deprecated(2019-04) Was file-stat successful?
// \deprecated(2019-04) - use valid() method
bool isValid() const { return valid_; }
};

View File

@ -159,14 +159,6 @@ public:
friend Istream& operator>>(Istream& is, fileStat& fs);
friend Ostream& operator<<(Ostream& os, const fileStat& fs);
// Housekeeping
//- Deprecated(2019-04) Was file-stat successful?
// \deprecated(2019-04) - use valid() method
bool isValid() const { return valid_; }
};

View File

@ -33,10 +33,21 @@ Description
The PCRE '(?i)' extension is provided to compile the regular expression
as being case-insensitive.
See also
SeeAlso
The manpage regex(7) for more information about POSIX regular expressions.
These differ somewhat from \c Perl and \c sed regular expressions.
SeeAlso
Foam::regExp and Foam::regExpCxx
Warning
This class should not be used directly.
Use the Foam::regExp typedef instead.
\deprecated
This class will be superseded by Foam::regExpCxx as compiler support
for regular expressions continues to improve.
SourceFiles
regExpPosixI.H
regExpPosix.C
@ -49,13 +60,6 @@ SourceFiles
#include <regex.h>
#include <string>
// Transitional feature - support std::smatch as per C++11 regex
#undef Foam_regExpPosix_cxx
#ifdef Foam_regExpPosix_cxx
#include <regex>
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -80,18 +84,13 @@ public:
// Public Types
#ifdef Foam_regExpPosix_cxx
//- Type for matches, as per C++11 regex
typedef std::smatch results_type;
#else
//- Type for matches, use OpenFOAM SubStrings container
//- Type for matches - similar to std::smatch
typedef SubStrings<std::string> results_type;
#endif
// Static Member Data
//- The default grammar (unused) - for future-compatibility
//- Grammar (unused) - for compatibility with Foam::regExpCxx
static int grammar;

View File

@ -45,6 +45,10 @@ Note
For example, gcc 4.8 is known to fail.
For these systems the POSIX implementation or alternative must be used.
Warning
This class should not be used directly.
Use the Foam::regExp typedef instead.
SourceFiles
regExpCxxI.H
regExpCxx.C
@ -209,7 +213,6 @@ public:
//- Assign and compile pattern from string.
// Matching is case sensitive.
inline void operator=(const std::string& pattern);
};

View File

@ -203,7 +203,7 @@ static void expandLeading(std::string& s)
}
else if (s[1] == '/')
{
s.std::string::replace(0, 1, cwd());
s.replace(0, 1, cwd());
}
break;
}
@ -651,13 +651,7 @@ static void expandString
)
);
s.std::string::replace
(
replaceBeg,
varBeg - replaceBeg,
varValue
);
s.replace(replaceBeg, varBeg - replaceBeg, varValue);
varBeg = replaceBeg+varValue.size();
}
else
@ -677,12 +671,7 @@ static void expandString
)
);
s.std::string::replace
(
varBeg,
varName.size()+1,
varValue
);
s.replace(varBeg, varName.size()+1, varValue);
varBeg += varValue.size();
}
}
@ -842,29 +831,19 @@ void Foam::stringOps::inplaceExpand
// Found and ":+" alternative
// Not-found and ":-" alternative
s.std::string::replace
(
varBeg,
varEnd - varBeg + 1,
altValue
);
s.replace(varBeg, varEnd - varBeg + 1, altValue);
varBeg += altValue.size();
}
else if (fnd.found())
{
// Found: use value
s.std::string::replace
(
varBeg,
varEnd - varBeg + 1,
*fnd
);
s.replace(varBeg, varEnd - varBeg + 1, *fnd);
varBeg += (*fnd).size();
}
else
{
// Not-found: empty value
s.std::string::erase(varBeg, varEnd - varBeg + 1);
s.erase(varBeg, varEnd - varBeg + 1);
}
}
}