STYLE/ENH: reduce code duplication for coded boundary conditions (issue #184)

- relocate common dictionary output into codedBase class
This commit is contained in:
Mark Olesen
2016-06-09 16:13:04 +01:00
parent ecfbdce3da
commit aeb667e1f4
5 changed files with 54 additions and 156 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -43,6 +43,7 @@ namespace Foam
{
// Forward declaration of classes
class Ostream;
class dynamicCode;
class dynamicCodeContext;
class dlLibraryTable;
@ -83,14 +84,17 @@ class codedBase
void createLibrary(dynamicCode&, const dynamicCodeContext&) const;
//- Disallow default bitwise copy construct
codedBase(const codedBase&);
codedBase(const codedBase&) = delete;
//- Disallow default bitwise assignment
void operator=(const codedBase&);
void operator=(const codedBase&) = delete;
protected:
//- Write code-dictionary contents
static void writeCodeDict(Ostream&, const dictionary&);
//- Update library as required
void updateLibrary
(