ENH: mutable libs() access in Time and other classes (#1737)

- This reflects the pre-existing coding situation where const_cast was
  used throughout to effect the same.

STYLE: fix private/protected access

- CodedField, codedMixedFvPatchField
This commit is contained in:
Mark Olesen
2020-07-14 10:48:50 +02:00
parent 41d3e6f1d4
commit 1e7c6ea2f1
30 changed files with 79 additions and 88 deletions

View File

@ -88,7 +88,7 @@ namespace PatchFunction1Types
{
/*---------------------------------------------------------------------------*\
Class CodedField Declaration
Class CodedField Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
@ -109,7 +109,15 @@ class CodedField
// Private Member Functions
//- Get the loaded dynamic libraries
//- Get reference to the underlying Function1
const PatchFunction1<Type>& redirectFunction() const;
protected:
// Protected Member Functions
//- Mutable access to the loaded dynamic libraries
virtual dlLibraryTable& libs() const;
//- Adapt the context for the current object
@ -121,9 +129,6 @@ class CodedField
// Clear the ptr to the redirected object
virtual void clearRedirect() const;
//- Get reference to the underlying Function1
const PatchFunction1<Type>& redirectFunction() const;
// Get the (sub)dictionary to initialize the codeContext
virtual const dictionary& codeDict(const dictionary& fullDict) const;