Base class for template-invariant parts of Function1. More...
#include <function1Base.H>


Public Member Functions | |
| function1Base (const word &entryName, const objectRegistry *obrPtr=nullptr) | |
| Construct from entry name and optional registry. | |
| function1Base (const word &entryName, const dictionary &dict, const objectRegistry *obrPtr=nullptr) | |
| Construct from entry name, dictionary (unused) and optional registry. | |
| function1Base (const function1Base &rhs) | |
| Copy construct. | |
| virtual | ~function1Base () |
| Destructor. | |
| const word & | name () const noexcept |
| The name of the entry. | |
| const objectRegistry * | whichDb () const noexcept |
| Return the associated registry or nullptr. | |
| void | resetDb (const objectRegistry *obrPtr=nullptr) noexcept |
| Reset the associated objectRegistry. | |
| void | resetDb (const objectRegistry &db) noexcept |
| Reset the associated objectRegistry. | |
| const objectRegistry & | obr () const |
| Return the object registry. | |
| bool | isTime () const noexcept |
| Return true if this function was created with the time database. | |
| const Time & | time () const |
| Return the time database. | |
| template<class MeshType> | |
| const MeshType & | mesh (const word ®ionName=word::null) const |
| Return the mesh database if this Function1 was created using a mesh. | |
| virtual void | userTimeToTime (const Time &t) |
| Convert time. | |
| Public Member Functions inherited from refCount | |
| constexpr | refCount () noexcept |
| Default construct, initializing count to 0. | |
| int | use_count () const noexcept |
| Return the current reference count. | |
| bool | unique () const noexcept |
| Return true if the reference count is zero. | |
| void | operator++ () noexcept |
| Increment the reference count. | |
| void | operator++ (int) noexcept |
| Increment the reference count. | |
| void | operator-- () noexcept |
| Decrement the reference count. | |
| void | operator-- (int) noexcept |
| Decrement the reference count. | |
Protected Member Functions | |
| void | operator= (const function1Base &)=delete |
| No copy assignment. | |
Protected Attributes | |
| const word | name_ |
| Name of entry. | |
| const objectRegistry * | obrPtr_ |
| Pointer to an object registry. | |
Base class for template-invariant parts of Function1.
Definition at line 50 of file function1Base.H.
|
explicit |
Construct from entry name and optional registry.
Definition at line 43 of file function1Base.C.
References name_, obrPtr_, and refCount::refCount().
Referenced by Function1< Type >::Function1(), Function1< Type >::Function1(), Function1< Type >::Function1(), function1Base(), and operator=().


| function1Base | ( | const word & | entryName, |
| const dictionary & | dict, | ||
| const objectRegistry * | obrPtr = nullptr ) |
Construct from entry name, dictionary (unused) and optional registry.
Definition at line 55 of file function1Base.C.
References dict, name_, obrPtr_, and refCount::refCount().

|
explicit |
Copy construct.
Definition at line 68 of file function1Base.C.
References function1Base(), name_, obrPtr_, refCount::refCount(), and Foam::rhs().

|
virtual |
Destructor.
Definition at line 79 of file function1Base.C.
|
protecteddelete |
No copy assignment.
References dict, function1Base(), and Foam::rhs().

|
inlinenoexcept |
The name of the entry.
Definition at line 127 of file function1Base.H.
References name_, and Foam::noexcept.
Referenced by TableBase< Type >::operator=(), and TableBase< Type >::TableBase().

|
inlinenoexcept |
Return the associated registry or nullptr.
Definition at line 135 of file function1Base.H.
References Foam::noexcept, and obrPtr_.
Referenced by mesh().

|
noexcept |
Reset the associated objectRegistry.
Definition at line 116 of file function1Base.C.
References obrPtr_.
|
noexcept |
Reset the associated objectRegistry.
Definition at line 122 of file function1Base.C.
References obrPtr_.
| const Foam::objectRegistry & obr | ( | ) | const |
Return the object registry.
FatalError if object registry is not set
Definition at line 85 of file function1Base.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and obrPtr_.
Referenced by Lookup< Type >::value().


|
noexcept |
Return true if this function was created with the time database.
Definition at line 110 of file function1Base.C.
References Foam::noexcept, and obrPtr_.
| const Foam::Time & time | ( | ) | const |
Return the time database.
FatalError if object registry is not set
Definition at line 97 of file function1Base.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and obrPtr_.
Referenced by CodedFunction1< Type >::libs(), and FunctionObjectValue< Type >::value().


|
inline |
Return the mesh database if this Function1 was created using a mesh.
Note: relies on refCast failure if the type is not correct
Definition at line 175 of file function1Base.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, objectRegistry::lookupObject(), mesh(), Foam::refCast(), regionName, and whichDb().
Referenced by mesh(), and Sample< Type >::value().


|
virtual |
Convert time.
Reimplemented in Polynomial< Type >, ramp, Sine< Type >, and TableBase< Type >.
Definition at line 128 of file function1Base.C.
|
protected |
Name of entry.
Definition at line 69 of file function1Base.H.
Referenced by Function1< Foam::Vector< scalar > >::Function1(), function1Base(), function1Base(), function1Base(), and name().
|
protected |
Pointer to an object registry.
Definition at line 74 of file function1Base.H.
Referenced by function1Base(), function1Base(), function1Base(), isTime(), obr(), resetDb(), resetDb(), time(), and whichDb().