Commit b043be30 authored by Mark Olesen's avatar Mark Olesen Committed by Andrew Heather
Browse files

STYLE: add notices for deprecated dictionary methods

parent 3a00dd9b
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2016 OpenFOAM Foundation
......@@ -313,7 +313,7 @@ void rewriteField
if
(
boundaryField.found(patchName)
&& !boundaryField.found(newName, false, false)
&& !boundaryField.found(newName, keyType::LITERAL)
)
{
Info<< " Changing entry " << patchName << " to " << newName
......
......@@ -243,8 +243,7 @@ public:
//- Deprecated(2019-01) Pointing at a valid storage node
// \deprecated(2019-01) - use good() method
inline bool found() const
FOAM_DEPRECATED_FOR(2019-01, "good() method")
bool FOAM_DEPRECATED_FOR(2019-01, "good() method") found() const
{
return this->good();
}
......@@ -297,8 +296,7 @@ public:
//- Deprecated(2019-01) Pointing at a valid storage node
// \deprecated(2019-01) - use good() method
inline bool found() const
FOAM_DEPRECATED_FOR(2019-01, "good() method")
bool FOAM_DEPRECATED_FOR(2019-01, "good() method") found() const
{
return this->good();
}
......
......@@ -219,8 +219,7 @@ public:
//- Deprecated(2019-01) Pointing at a valid storage node
// \deprecated(2019-01) - use good() method
inline bool found() const
FOAM_DEPRECATED_FOR(2019-01, "good() method")
bool FOAM_DEPRECATED_FOR(2019-01, "good() method") found() const
{
return this->good();
}
......@@ -271,8 +270,7 @@ public:
//- Deprecated(2019-01) Pointing at a valid storage node
// \deprecated(2019-01) - use good() method
inline bool found() const
FOAM_DEPRECATED_FOR(2019-01, "good() method")
bool FOAM_DEPRECATED_FOR(2019-01, "good() method") found() const
{
return this->good();
}
......
......@@ -1108,7 +1108,8 @@ public:
//- Deprecated(2018-07) find and return an entry data stream
//
// \deprecated(2018-07) - use lookup() method
ITstream& operator[](const word& keyword) const
ITstream& FOAM_DEPRECATED_FOR(2018-07, "lookup() method")
operator[](const word& keyword) const
{
return lookup(keyword);
}
......@@ -1116,7 +1117,8 @@ public:
//- Deprecated(2018-10) find and return a T.
// \deprecated(2018-10) - use get() method
template<class T>
T lookupType
T FOAM_DEPRECATED_FOR(2018-10, "get() method")
lookupType
(
const word& keyword,
bool recursive = false,
......@@ -1128,7 +1130,8 @@ public:
//- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version
bool found
bool FOAM_DEPRECATED_FOR(2018-10, "found(keyType::option)")
found
(
const word& keyword,
bool recursive,
......@@ -1140,7 +1143,9 @@ public:
//- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version
entry* lookupEntryPtr
entry*
FOAM_DEPRECATED_FOR(2018-10, "lookupEntryPtr(keyType::option)")
lookupEntryPtr
(
const word& keyword,
bool recursive,
......@@ -1152,7 +1157,9 @@ public:
//- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version
const entry* lookupEntryPtr
const entry*
FOAM_DEPRECATED_FOR(2018-10, "lookupEntryPtr(keyType::option)")
lookupEntryPtr
(
const word& keyword,
bool recursive,
......@@ -1164,7 +1171,9 @@ public:
//- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version
const entry* lookupScopedEntryPtr
const entry*
FOAM_DEPRECATED_FOR(2018-10, "lookupScopedEntryPtr(keyType::option)")
lookupScopedEntryPtr
(
const word& keyword,
bool recursive,
......@@ -1180,7 +1189,9 @@ public:
//
// Search type: non-recursive with patterns.
// \deprecated(2018-10) - use findDict() method
const dictionary* subDictPtr(const word& keyword) const
const dictionary*
FOAM_DEPRECATED_FOR(2018-10, "findDict() method")
subDictPtr(const word& keyword) const
{
return findDict(keyword, keyType::REGEX);
}
......@@ -1191,14 +1202,18 @@ public:
//
// Search type: non-recursive with patterns.
// \deprecated(2018-10) - use findDict() method
dictionary* subDictPtr(const word& keyword)
dictionary*
FOAM_DEPRECATED_FOR(2018-10, "findDict() method")
subDictPtr(const word& keyword)
{
return findDict(keyword, keyType::REGEX);
}
//- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version
const entry& lookupEntry
const entry&
FOAM_DEPRECATED_FOR(2018-10, "lookupEntry(keyType::option)")
lookupEntry
(
const word& keyword,
bool recursive,
......@@ -1210,7 +1225,9 @@ public:
//- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version
ITstream& lookup
ITstream&
FOAM_DEPRECATED_FOR(2018-10, "lookup(keyType::option)")
lookup
(
const word& keyword,
bool recursive,
......@@ -1223,7 +1240,8 @@ public:
//- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version
template<class T>
T lookupOrDefault
T FOAM_DEPRECATED_FOR(2018-10, "lookupOrDefault(keyType::option)")
lookupOrDefault
(
const word& keyword,
const T& deflt,
......@@ -1239,7 +1257,8 @@ public:
//- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version
template<class T>
T lookupOrAddDefault
T FOAM_DEPRECATED_FOR(2018-10, "lookupOrAddDefault(keyType::option)")
lookupOrAddDefault
(
const word& keyword,
const T& deflt,
......@@ -1255,7 +1274,9 @@ public:
//- Deprecated(2018-10)
// \deprecated(2018-10) - use keyType::option version
template<class T>
bool readIfPresent
bool
FOAM_DEPRECATED_FOR(2018-10, "readIfPresent(keyType::option)")
readIfPresent
(
const word& keyword,
T& val,
......
......@@ -202,8 +202,8 @@ public:
//- Legacy name for areaNormal()
// \deprecated(2018-06) Deprecated for new use
inline vector normal(const UList<point>& p) const
FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()")
vector FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()")
normal(const UList<point>& p) const
{
return areaNormal(p); // Legacy definition
}
......
......@@ -133,8 +133,8 @@ public:
//- Legacy name for areaNormal()
// \deprecated(2018-06) Deprecated for new use
inline vector normal(const UList<point>& points) const
FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()")
vector FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()")
normal(const UList<point>& points) const
{
return areaNormal(points); // Legacy definition
}
......
......@@ -216,8 +216,8 @@ public:
//- Legacy name for areaNormal().
// \deprecated(2018-06) Deprecated for new use
inline vector normal() const
FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()")
vector FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()")
normal() const
{
return areaNormal();
}
......
......@@ -182,10 +182,10 @@ public:
//- Deprecated(2019-01) Is the specified name found in the list?
// \deprecated(2019-01) - use found() method
inline bool contains(const word& name) const
FOAM_DEPRECATED_FOR(2019-01, "found() method")
bool FOAM_DEPRECATED_FOR(2019-01, "found() method")
contains(const word& name) const
{
return this-found(name);
return this->found(name);
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment