84#ifndef functionObjects_codedFunctionObject_H
85#define functionObjects_codedFunctionObject_H
94namespace functionObjects
101class codedFunctionObject
103 public functionObjects::timeFunctionObject,
128 virtual dlLibraryTable&
libs()
const;
159 =
"functionObjectTemplate.C";
163 =
"functionObjectTemplate.H";
198 virtual bool write();
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Base class for function objects and boundary conditions using dynamic code that provides methods for ...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A table of dynamically loaded libraries.
Encapsulation of dynamic code dictionaries.
Tools for handling dynamic code compilation.
Abstract base-class for Time/database function objects.
const word & name() const noexcept
Return the name of this functionObject.
Provides a general interface to enable dynamic code compilation.
virtual const dictionary & codeContext() const
Additional 'codeContext' dictionary to pass through.
virtual void prepare(dynamicCode &, const dynamicCodeContext &) const
Adapt the context for the current object.
autoPtr< functionObject > redirectFunctionObjectPtr_
Underlying functionObject.
functionObject & redirectFunctionObject() const
Dynamically compiled functionObject.
dictionary dict_
Input dictionary.
TypeName("coded")
Runtime type information.
void operator=(const codedFunctionObject &)=delete
No copy assignment.
virtual ~codedFunctionObject()=default
Destructor.
codedFunctionObject(const codedFunctionObject &)=delete
No copy construct.
static constexpr const char *const codeTemplateC
Name of the C code template to be used.
virtual const dictionary & codeDict() const
The code dictionary.
virtual void clearRedirect() const
Clear redirected object(s)
static constexpr const char *const codeTemplateH
Name of the H code template to be used.
virtual bool execute()
Called at each ++ or += of the time-loop.
virtual bool write()
Called at each ++ or += of the time-loop.
virtual dlLibraryTable & libs() const
Mutable access to the loaded dynamic libraries.
virtual bool end()
Called when Time::run() determines that the time-loop exits.
virtual bool read(const dictionary &)
Read and set the function object if its data have changed.
virtual string description() const
Description (type + name) for the output.
Virtual base class for function objects with a reference to Time.
A class for handling words, derived from Foam::string.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.