mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: dimensionSet - added copy/clone functionality
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -78,6 +78,12 @@ Foam::dimensionSet::dimensionSet
|
||||
}
|
||||
|
||||
|
||||
Foam::dimensionSet::dimensionSet(const dimensionSet& ds)
|
||||
{
|
||||
reset(ds);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::dimensionSet::dimensionless() const
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -158,6 +158,7 @@ private:
|
||||
|
||||
label size_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
void push(const token&);
|
||||
@ -172,6 +173,7 @@ private:
|
||||
|
||||
tokeniser(Istream&);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
Istream& stream()
|
||||
@ -190,7 +192,6 @@ private:
|
||||
static bool valid(char c);
|
||||
|
||||
static label priority(const token& t);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -244,6 +245,15 @@ public:
|
||||
const scalar moles
|
||||
);
|
||||
|
||||
//- Copy constructor
|
||||
dimensionSet(const dimensionSet& ds);
|
||||
|
||||
//- Construct and return a clone
|
||||
autoPtr<dimensionSet> clone() const
|
||||
{
|
||||
return autoPtr<dimensionSet>(new dimensionSet(*this));
|
||||
}
|
||||
|
||||
//- Construct from Istream
|
||||
dimensionSet(Istream&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user