Skip to content
Snippets Groups Projects
Commit f8991db9 authored by andy's avatar andy
Browse files

ENH: dimensionSet - added copy/clone functionality

parent a1e9e518
No related branches found
No related tags found
No related merge requests found
......@@ -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&);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment