mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
tmp: encapsulate refCount to enable the option for tmp to use a specific version
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,12 +29,12 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
const char* const token::typeName = "token";
|
const char* const token::typeName = "token";
|
||||||
token token::undefinedToken;
|
token token::undefinedToken;
|
||||||
|
|
||||||
typedef token::compound tokenCompound;
|
typedef token::compound tokenCompound;
|
||||||
defineTypeNameAndDebug(tokenCompound, 0);
|
defineTypeNameAndDebug(tokenCompound, 0);
|
||||||
defineRunTimeSelectionTable(tokenCompound, Istream);
|
defineRunTimeSelectionTable(tokenCompound, Istream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -25,15 +25,9 @@ License
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
// Clear any allocated storage (word or string)
|
inline void Foam::token::clear()
|
||||||
inline void token::clear()
|
|
||||||
{
|
{
|
||||||
if (type_ == WORD)
|
if (type_ == WORD)
|
||||||
{
|
{
|
||||||
@ -61,15 +55,14 @@ inline void token::clear()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct null
|
inline Foam::token::token()
|
||||||
inline token::token()
|
|
||||||
:
|
:
|
||||||
type_(UNDEFINED),
|
type_(UNDEFINED),
|
||||||
lineNumber_(0)
|
lineNumber_(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// Construct as copy
|
|
||||||
inline token::token(const token& t)
|
inline Foam::token::token(const token& t)
|
||||||
:
|
:
|
||||||
type_(t.type_),
|
type_(t.type_),
|
||||||
lineNumber_(t.lineNumber_)
|
lineNumber_(t.lineNumber_)
|
||||||
@ -115,48 +108,48 @@ inline token::token(const token& t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct punctuation character token
|
|
||||||
inline token::token(punctuationToken p, label lineNumber)
|
inline Foam::token::token(punctuationToken p, label lineNumber)
|
||||||
:
|
:
|
||||||
type_(PUNCTUATION),
|
type_(PUNCTUATION),
|
||||||
punctuationToken_(p),
|
punctuationToken_(p),
|
||||||
lineNumber_(lineNumber)
|
lineNumber_(lineNumber)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// Construct word token
|
|
||||||
inline token::token(const word& w, label lineNumber)
|
inline Foam::token::token(const word& w, label lineNumber)
|
||||||
:
|
:
|
||||||
type_(WORD),
|
type_(WORD),
|
||||||
wordTokenPtr_(new word(w)),
|
wordTokenPtr_(new word(w)),
|
||||||
lineNumber_(lineNumber)
|
lineNumber_(lineNumber)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// Construct string token
|
|
||||||
inline token::token(const string& s, label lineNumber)
|
inline Foam::token::token(const string& s, label lineNumber)
|
||||||
:
|
:
|
||||||
type_(STRING),
|
type_(STRING),
|
||||||
stringTokenPtr_(new string(s)),
|
stringTokenPtr_(new string(s)),
|
||||||
lineNumber_(lineNumber)
|
lineNumber_(lineNumber)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// Construct label token
|
|
||||||
inline token::token(const label l, label lineNumber)
|
inline Foam::token::token(const label l, label lineNumber)
|
||||||
:
|
:
|
||||||
type_(LABEL),
|
type_(LABEL),
|
||||||
labelToken_(l),
|
labelToken_(l),
|
||||||
lineNumber_(lineNumber)
|
lineNumber_(lineNumber)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// Construct floatScalar token
|
|
||||||
inline token::token(const floatScalar s, label lineNumber)
|
inline Foam::token::token(const floatScalar s, label lineNumber)
|
||||||
:
|
:
|
||||||
type_(FLOAT_SCALAR),
|
type_(FLOAT_SCALAR),
|
||||||
floatScalarToken_(s),
|
floatScalarToken_(s),
|
||||||
lineNumber_(lineNumber)
|
lineNumber_(lineNumber)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// Construct doubleScalar token
|
|
||||||
inline token::token(const doubleScalar s, label lineNumber)
|
inline Foam::token::token(const doubleScalar s, label lineNumber)
|
||||||
:
|
:
|
||||||
type_(DOUBLE_SCALAR),
|
type_(DOUBLE_SCALAR),
|
||||||
doubleScalarToken_(s),
|
doubleScalarToken_(s),
|
||||||
@ -166,8 +159,7 @@ inline token::token(const doubleScalar s, label lineNumber)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Delete token clearing the storage used by word or string
|
inline Foam::token::~token()
|
||||||
inline token::~token()
|
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
@ -175,37 +167,37 @@ inline token::~token()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline token::tokenType token::type() const
|
inline Foam::token::tokenType Foam::token::type() const
|
||||||
{
|
{
|
||||||
return type_;
|
return type_;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline token::tokenType& token::type()
|
inline Foam::token::tokenType& Foam::token::type()
|
||||||
{
|
{
|
||||||
return type_;
|
return type_;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::good() const
|
inline bool Foam::token::good() const
|
||||||
{
|
{
|
||||||
return (type_ != ERROR && type_ != UNDEFINED);
|
return (type_ != ERROR && type_ != UNDEFINED);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::undefined() const
|
inline bool Foam::token::undefined() const
|
||||||
{
|
{
|
||||||
return (type_ == UNDEFINED);
|
return (type_ == UNDEFINED);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::error() const
|
inline bool Foam::token::error() const
|
||||||
{
|
{
|
||||||
return (type_ == ERROR);
|
return (type_ == ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::isPunctuation() const
|
inline bool Foam::token::isPunctuation() const
|
||||||
{
|
{
|
||||||
return (type_ == PUNCTUATION);
|
return (type_ == PUNCTUATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline token::punctuationToken token::pToken() const
|
inline Foam::token::punctuationToken Foam::token::pToken() const
|
||||||
{
|
{
|
||||||
if (type_ == PUNCTUATION)
|
if (type_ == PUNCTUATION)
|
||||||
{
|
{
|
||||||
@ -218,12 +210,12 @@ inline token::punctuationToken token::pToken() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::isWord() const
|
inline bool Foam::token::isWord() const
|
||||||
{
|
{
|
||||||
return (type_ == WORD);
|
return (type_ == WORD);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const word& token::wordToken() const
|
inline const Foam::word& Foam::token::wordToken() const
|
||||||
{
|
{
|
||||||
if (type_ == WORD)
|
if (type_ == WORD)
|
||||||
{
|
{
|
||||||
@ -236,17 +228,17 @@ inline const word& token::wordToken() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::isVariable() const
|
inline bool Foam::token::isVariable() const
|
||||||
{
|
{
|
||||||
return (type_ == VARIABLE);
|
return (type_ == VARIABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::isString() const
|
inline bool Foam::token::isString() const
|
||||||
{
|
{
|
||||||
return (type_ == STRING || type_ == VARIABLE || type_ == VERBATIMSTRING);
|
return (type_ == STRING || type_ == VARIABLE || type_ == VERBATIMSTRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const string& token::stringToken() const
|
inline const Foam::string& Foam::token::stringToken() const
|
||||||
{
|
{
|
||||||
if (type_ == STRING || type_ == VARIABLE || type_ == VERBATIMSTRING)
|
if (type_ == STRING || type_ == VARIABLE || type_ == VERBATIMSTRING)
|
||||||
{
|
{
|
||||||
@ -259,12 +251,12 @@ inline const string& token::stringToken() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::isLabel() const
|
inline bool Foam::token::isLabel() const
|
||||||
{
|
{
|
||||||
return (type_ == LABEL);
|
return (type_ == LABEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline label token::labelToken() const
|
inline Foam::label Foam::token::labelToken() const
|
||||||
{
|
{
|
||||||
if (type_ == LABEL)
|
if (type_ == LABEL)
|
||||||
{
|
{
|
||||||
@ -277,12 +269,12 @@ inline label token::labelToken() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::isFloatScalar() const
|
inline bool Foam::token::isFloatScalar() const
|
||||||
{
|
{
|
||||||
return (type_ == FLOAT_SCALAR);
|
return (type_ == FLOAT_SCALAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline floatScalar token::floatScalarToken() const
|
inline Foam::floatScalar Foam::token::floatScalarToken() const
|
||||||
{
|
{
|
||||||
if (type_ == FLOAT_SCALAR)
|
if (type_ == FLOAT_SCALAR)
|
||||||
{
|
{
|
||||||
@ -296,12 +288,12 @@ inline floatScalar token::floatScalarToken() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool token::isDoubleScalar() const
|
inline bool Foam::token::isDoubleScalar() const
|
||||||
{
|
{
|
||||||
return (type_ == DOUBLE_SCALAR);
|
return (type_ == DOUBLE_SCALAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline doubleScalar token::doubleScalarToken() const
|
inline Foam::doubleScalar Foam::token::doubleScalarToken() const
|
||||||
{
|
{
|
||||||
if (type_ == DOUBLE_SCALAR)
|
if (type_ == DOUBLE_SCALAR)
|
||||||
{
|
{
|
||||||
@ -315,12 +307,12 @@ inline doubleScalar token::doubleScalarToken() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool token::isScalar() const
|
inline bool Foam::token::isScalar() const
|
||||||
{
|
{
|
||||||
return (type_ == FLOAT_SCALAR || type_ == DOUBLE_SCALAR);
|
return (type_ == FLOAT_SCALAR || type_ == DOUBLE_SCALAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline scalar token::scalarToken() const
|
inline Foam::scalar Foam::token::scalarToken() const
|
||||||
{
|
{
|
||||||
if (type_ == FLOAT_SCALAR)
|
if (type_ == FLOAT_SCALAR)
|
||||||
{
|
{
|
||||||
@ -337,12 +329,12 @@ inline scalar token::scalarToken() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::isNumber() const
|
inline bool Foam::token::isNumber() const
|
||||||
{
|
{
|
||||||
return (type_ == LABEL || isScalar());
|
return (type_ == LABEL || isScalar());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline scalar token::number() const
|
inline Foam::scalar Foam::token::number() const
|
||||||
{
|
{
|
||||||
if (type_ == LABEL)
|
if (type_ == LABEL)
|
||||||
{
|
{
|
||||||
@ -359,12 +351,12 @@ inline scalar token::number() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::isCompound() const
|
inline bool Foam::token::isCompound() const
|
||||||
{
|
{
|
||||||
return (type_ == COMPOUND);
|
return (type_ == COMPOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const token::compound& token::compoundToken() const
|
inline const Foam::token::compound& Foam::token::compoundToken() const
|
||||||
{
|
{
|
||||||
if (type_ == COMPOUND)
|
if (type_ == COMPOUND)
|
||||||
{
|
{
|
||||||
@ -378,18 +370,18 @@ inline const token::compound& token::compoundToken() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline label token::lineNumber() const
|
inline Foam::label Foam::token::lineNumber() const
|
||||||
{
|
{
|
||||||
return lineNumber_;
|
return lineNumber_;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline label& token::lineNumber()
|
inline Foam::label& Foam::token::lineNumber()
|
||||||
{
|
{
|
||||||
return lineNumber_;
|
return lineNumber_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void token::setBad()
|
inline void Foam::token::setBad()
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
type_ = ERROR;
|
type_ = ERROR;
|
||||||
@ -398,7 +390,7 @@ inline void token::setBad()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline void token::operator=(const token& t)
|
inline void Foam::token::operator=(const token& t)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
type_ = t.type_;
|
type_ = t.type_;
|
||||||
@ -446,59 +438,59 @@ inline void token::operator=(const token& t)
|
|||||||
lineNumber_ = t.lineNumber_;
|
lineNumber_ = t.lineNumber_;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void token::operator=(const punctuationToken p)
|
inline void Foam::token::operator=(const punctuationToken p)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
type_ = PUNCTUATION;
|
type_ = PUNCTUATION;
|
||||||
punctuationToken_ = p;
|
punctuationToken_ = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void token::operator=(word* wPtr)
|
inline void Foam::token::operator=(word* wPtr)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
type_ = WORD;
|
type_ = WORD;
|
||||||
wordTokenPtr_ = wPtr;
|
wordTokenPtr_ = wPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void token::operator=(const word& w)
|
inline void Foam::token::operator=(const word& w)
|
||||||
{
|
{
|
||||||
operator=(new word(w));
|
operator=(new word(w));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void token::operator=(string* sPtr)
|
inline void Foam::token::operator=(string* sPtr)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
type_ = STRING;
|
type_ = STRING;
|
||||||
stringTokenPtr_ = sPtr;
|
stringTokenPtr_ = sPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void token::operator=(const string& s)
|
inline void Foam::token::operator=(const string& s)
|
||||||
{
|
{
|
||||||
operator=(new string(s));
|
operator=(new string(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void token::operator=(const label l)
|
inline void Foam::token::operator=(const label l)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
type_ = LABEL;
|
type_ = LABEL;
|
||||||
labelToken_ = l;
|
labelToken_ = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void token::operator=(const floatScalar s)
|
inline void Foam::token::operator=(const floatScalar s)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
type_ = FLOAT_SCALAR;
|
type_ = FLOAT_SCALAR;
|
||||||
floatScalarToken_ = s;
|
floatScalarToken_ = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void token::operator=(const doubleScalar s)
|
inline void Foam::token::operator=(const doubleScalar s)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
type_ = DOUBLE_SCALAR;
|
type_ = DOUBLE_SCALAR;
|
||||||
doubleScalarToken_ = s;
|
doubleScalarToken_ = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void token::operator=(token::compound* cPtr)
|
inline void Foam::token::operator=(Foam::token::compound* cPtr)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
type_ = COMPOUND;
|
type_ = COMPOUND;
|
||||||
@ -506,7 +498,7 @@ inline void token::operator=(token::compound* cPtr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool token::operator==(const token& t) const
|
inline bool Foam::token::operator==(const token& t) const
|
||||||
{
|
{
|
||||||
if (type_ != t.type_)
|
if (type_ != t.type_)
|
||||||
{
|
{
|
||||||
@ -548,17 +540,17 @@ inline bool token::operator==(const token& t) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator==(const punctuationToken p) const
|
inline bool Foam::token::operator==(const punctuationToken p) const
|
||||||
{
|
{
|
||||||
return (type_ == PUNCTUATION && punctuationToken_ == p);
|
return (type_ == PUNCTUATION && punctuationToken_ == p);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator==(const word& w) const
|
inline bool Foam::token::operator==(const word& w) const
|
||||||
{
|
{
|
||||||
return (type_ == WORD && wordToken() == w);
|
return (type_ == WORD && wordToken() == w);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator==(const string& s) const
|
inline bool Foam::token::operator==(const string& s) const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
@ -567,59 +559,55 @@ inline bool token::operator==(const string& s) const
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator==(const label l) const
|
inline bool Foam::token::operator==(const label l) const
|
||||||
{
|
{
|
||||||
return (type_ == LABEL && labelToken_ == l);
|
return (type_ == LABEL && labelToken_ == l);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator==(const floatScalar s) const
|
inline bool Foam::token::operator==(const floatScalar s) const
|
||||||
{
|
{
|
||||||
return (type_ == FLOAT_SCALAR && equal(floatScalarToken_, s));
|
return (type_ == FLOAT_SCALAR && equal(floatScalarToken_, s));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator==(const doubleScalar s) const
|
inline bool Foam::token::operator==(const doubleScalar s) const
|
||||||
{
|
{
|
||||||
return (type_ == DOUBLE_SCALAR && equal(doubleScalarToken_, s));
|
return (type_ == DOUBLE_SCALAR && equal(doubleScalarToken_, s));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator!=(const token& t) const
|
inline bool Foam::token::operator!=(const token& t) const
|
||||||
{
|
{
|
||||||
return !operator==(t);
|
return !operator==(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator!=(const punctuationToken p) const
|
inline bool Foam::token::operator!=(const punctuationToken p) const
|
||||||
{
|
{
|
||||||
return !operator==(p);
|
return !operator==(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator!=(const word& w) const
|
inline bool Foam::token::operator!=(const word& w) const
|
||||||
{
|
{
|
||||||
return !operator==(w);
|
return !operator==(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator!=(const string& s) const
|
inline bool Foam::token::operator!=(const string& s) const
|
||||||
{
|
{
|
||||||
return !operator==(s);
|
return !operator==(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator!=(const floatScalar s) const
|
inline bool Foam::token::operator!=(const floatScalar s) const
|
||||||
{
|
{
|
||||||
return !operator==(s);
|
return !operator==(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator!=(const doubleScalar s) const
|
inline bool Foam::token::operator!=(const doubleScalar s) const
|
||||||
{
|
{
|
||||||
return !operator==(s);
|
return !operator==(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool token::operator!=(const label l) const
|
inline bool Foam::token::operator!=(const label l) const
|
||||||
{
|
{
|
||||||
return !operator==(l);
|
return !operator==(l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -39,11 +39,9 @@ Description
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef List<token> tokenList;
|
typedef List<token> tokenList;
|
||||||
typedef List<token::tokenType> tokenTypeList;
|
typedef List<token::tokenType> tokenTypeList;
|
||||||
|
}
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ inline Foam::SubDimensionedField<Type, GeoMesh>::SubDimensionedField
|
|||||||
const SubDimensionedField<Type, GeoMesh>& sfield
|
const SubDimensionedField<Type, GeoMesh>& sfield
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
refCount(),
|
tmp<SubDimensionedField<Type, GeoMesh>>::refCount(),
|
||||||
SubField<Type>(sfield)
|
SubField<Type>(sfield)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -137,7 +137,7 @@ FieldField<Field, Type>::FieldField
|
|||||||
template<template<class> class Field, class Type>
|
template<template<class> class Field, class Type>
|
||||||
FieldField<Field, Type>::FieldField(const FieldField<Field, Type>& f)
|
FieldField<Field, Type>::FieldField(const FieldField<Field, Type>& f)
|
||||||
:
|
:
|
||||||
refCount(),
|
tmp<FieldField<Field, Type>>::refCount(),
|
||||||
PtrList<Field<Type>>(f)
|
PtrList<Field<Type>>(f)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -145,7 +145,6 @@ FieldField<Field, Type>::FieldField(const FieldField<Field, Type>& f)
|
|||||||
template<template<class> class Field, class Type>
|
template<template<class> class Field, class Type>
|
||||||
FieldField<Field, Type>::FieldField(FieldField<Field, Type>& f, bool reuse)
|
FieldField<Field, Type>::FieldField(FieldField<Field, Type>& f, bool reuse)
|
||||||
:
|
:
|
||||||
refCount(),
|
|
||||||
PtrList<Field<Type>>(f, reuse)
|
PtrList<Field<Type>>(f, reuse)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ Ostream& operator<<
|
|||||||
template<template<class> class Field, class Type>
|
template<template<class> class Field, class Type>
|
||||||
class FieldField
|
class FieldField
|
||||||
:
|
:
|
||||||
public refCount,
|
public tmp<FieldField<Field, Type>>::refCount,
|
||||||
public PtrList<Field<Type>>
|
public PtrList<Field<Type>>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -196,7 +196,7 @@ Foam::Field<Type>::Field
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::Field<Type>::Field(const Field<Type>& f)
|
Foam::Field<Type>::Field(const Field<Type>& f)
|
||||||
:
|
:
|
||||||
refCount(),
|
tmp<Field<Type>>::refCount(),
|
||||||
List<Type>(f)
|
List<Type>(f)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class dictionary;
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class Field
|
class Field
|
||||||
:
|
:
|
||||||
public refCount,
|
public tmp<Field<Type>>::refCount,
|
||||||
public List<Type>
|
public List<Type>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ template<class Type> class SubField;
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class SubField
|
class SubField
|
||||||
:
|
:
|
||||||
public refCount,
|
public tmp<SubField<Type>>::refCount,
|
||||||
public SubList<Type>
|
public SubList<Type>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -74,7 +74,7 @@ inline Foam::SubField<Type>::SubField
|
|||||||
const SubField<Type>& sfield
|
const SubField<Type>& sfield
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
refCount(),
|
tmp<SubField<Type>>::refCount(),
|
||||||
SubList<Type>(sfield)
|
SubList<Type>(sfield)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,9 @@ class tmp
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef Foam::refCount refCount;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Store object pointer
|
//- Store object pointer
|
||||||
|
|||||||
@ -157,8 +157,6 @@ class polyMesh;
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class mapPolyMesh
|
class mapPolyMesh
|
||||||
:
|
|
||||||
public refCount
|
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,6 @@ SourceFiles
|
|||||||
#ifndef mapSubsetMesh_H
|
#ifndef mapSubsetMesh_H
|
||||||
#define mapSubsetMesh_H
|
#define mapSubsetMesh_H
|
||||||
|
|
||||||
#include "refCount.H"
|
|
||||||
#include "labelList.H"
|
#include "labelList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -47,8 +46,6 @@ namespace Foam
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class mapSubsetMesh
|
class mapSubsetMesh
|
||||||
:
|
|
||||||
public refCount
|
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,6 @@ License
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::Function1<Type>::Function1(const word& entryName)
|
Foam::Function1<Type>::Function1(const word& entryName)
|
||||||
:
|
:
|
||||||
refCount(),
|
|
||||||
name_(entryName)
|
name_(entryName)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -39,7 +38,7 @@ Foam::Function1<Type>::Function1(const word& entryName)
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::Function1<Type>::Function1(const Function1<Type>& de)
|
Foam::Function1<Type>::Function1(const Function1<Type>& de)
|
||||||
:
|
:
|
||||||
refCount(),
|
tmp<Function1<Type>>::refCount(),
|
||||||
name_(de.name_)
|
name_(de.name_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -62,9 +61,7 @@ const Foam::word& Foam::Function1<Type>::name() const
|
|||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::Function1<Type>::convertTimeBase(const Time&)
|
void Foam::Function1<Type>::convertTimeBase(const Time&)
|
||||||
{
|
{}
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -61,7 +61,7 @@ template<class Type> Ostream& operator<<(Ostream&, const Function1<Type>&);
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class Function1
|
class Function1
|
||||||
:
|
:
|
||||||
public refCount
|
public tmp<Function1<Type>>::refCount
|
||||||
{
|
{
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ namespace fv
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
convectionScheme<Type>::convectionScheme(const convectionScheme& cs)
|
convectionScheme<Type>::convectionScheme(const convectionScheme& cs)
|
||||||
:
|
:
|
||||||
refCount(),
|
tmp<convectionScheme<Type>>::refCount(),
|
||||||
mesh_(cs.mesh_)
|
mesh_(cs.mesh_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,7 @@ namespace fv
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class convectionScheme
|
class convectionScheme
|
||||||
:
|
:
|
||||||
public refCount
|
public tmp<convectionScheme<Type>>::refCount
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,7 @@ namespace fv
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class d2dt2Scheme
|
class d2dt2Scheme
|
||||||
:
|
:
|
||||||
public refCount
|
public tmp<d2dt2Scheme<Type>>::refCount
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -64,7 +64,7 @@ namespace fv
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class ddtScheme
|
class ddtScheme
|
||||||
:
|
:
|
||||||
public refCount
|
public tmp<ddtScheme<Type>>::refCount
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -64,7 +64,7 @@ namespace fv
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class divScheme
|
class divScheme
|
||||||
:
|
:
|
||||||
public refCount
|
public tmp<divScheme<Type>>::refCount
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -60,7 +60,7 @@ namespace fv
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class gradScheme
|
class gradScheme
|
||||||
:
|
:
|
||||||
public refCount
|
public tmp<gradScheme<Type>>::refCount
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@ namespace fv
|
|||||||
template<class Type, class GType>
|
template<class Type, class GType>
|
||||||
class laplacianScheme
|
class laplacianScheme
|
||||||
:
|
:
|
||||||
public refCount
|
public tmp<laplacianScheme<Type, GType>>::refCount
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@ -60,7 +60,7 @@ namespace fv
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class snGradScheme
|
class snGradScheme
|
||||||
:
|
:
|
||||||
public refCount
|
public tmp<snGradScheme<Type>>::refCount
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -70,6 +70,9 @@ class snGradScheme
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow copy construct
|
||||||
|
snGradScheme(const snGradScheme&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const snGradScheme&);
|
void operator=(const snGradScheme&);
|
||||||
|
|
||||||
|
|||||||
@ -321,7 +321,7 @@ Foam::fvMatrix<Type>::fvMatrix
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm)
|
Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm)
|
||||||
:
|
:
|
||||||
refCount(),
|
tmp<fvMatrix<Type>>::refCount(),
|
||||||
lduMatrix(fvm),
|
lduMatrix(fvm),
|
||||||
psi_(fvm.psi_),
|
psi_(fvm.psi_),
|
||||||
dimensions_(fvm.dimensions_),
|
dimensions_(fvm.dimensions_),
|
||||||
@ -351,7 +351,6 @@ Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm)
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type>>& tfvm)
|
Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type>>& tfvm)
|
||||||
:
|
:
|
||||||
refCount(),
|
|
||||||
lduMatrix
|
lduMatrix
|
||||||
(
|
(
|
||||||
const_cast<fvMatrix<Type>&>(tfvm()),
|
const_cast<fvMatrix<Type>&>(tfvm()),
|
||||||
|
|||||||
@ -114,7 +114,7 @@ template<class T> class UIndirectList;
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class fvMatrix
|
class fvMatrix
|
||||||
:
|
:
|
||||||
public refCount,
|
public tmp<fvMatrix<Type>>::refCount,
|
||||||
public lduMatrix
|
public lduMatrix
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|||||||
@ -50,7 +50,7 @@ namespace Foam
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class multivariateSurfaceInterpolationScheme
|
class multivariateSurfaceInterpolationScheme
|
||||||
:
|
:
|
||||||
public refCount
|
public tmp<multivariateSurfaceInterpolationScheme<Type>>::refCount
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -55,7 +55,7 @@ class fvMesh;
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class surfaceInterpolationScheme
|
class surfaceInterpolationScheme
|
||||||
:
|
:
|
||||||
public refCount
|
public tmp<surfaceInterpolationScheme<Type>>::refCount
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user