Loading...
Searching...
No Matches
function1Base Class Reference

Base class for template-invariant parts of Function1. More...

#include <function1Base.H>

Inheritance diagram for function1Base:
Collaboration diagram for function1Base:

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 wordname () const noexcept
 The name of the entry.
const objectRegistrywhichDb () 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 objectRegistryobr () const
 Return the object registry.
bool isTime () const noexcept
 Return true if this function was created with the time database.
const Timetime () const
 Return the time database.
template<class MeshType>
const MeshType & mesh (const word &regionName=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 objectRegistryobrPtr_
 Pointer to an object registry.

Detailed Description

Base class for template-invariant parts of Function1.

Source files

Definition at line 50 of file function1Base.H.

Constructor & Destructor Documentation

◆ function1Base() [1/3]

function1Base ( const word & entryName,
const objectRegistry * obrPtr = nullptr )
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=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ function1Base() [2/3]

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().

Here is the call graph for this function:

◆ function1Base() [3/3]

function1Base ( const function1Base & rhs)
explicit

Copy construct.

Definition at line 68 of file function1Base.C.

References function1Base(), name_, obrPtr_, refCount::refCount(), and Foam::rhs().

Here is the call graph for this function:

◆ ~function1Base()

~function1Base ( )
virtual

Destructor.

Definition at line 79 of file function1Base.C.

Member Function Documentation

◆ operator=()

void operator= ( const function1Base & )
protecteddelete

No copy assignment.

References dict, function1Base(), and Foam::rhs().

Here is the call graph for this function:

◆ name()

const word & name ( ) const
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().

Here is the caller graph for this function:

◆ whichDb()

const objectRegistry * whichDb ( ) const
inlinenoexcept

Return the associated registry or nullptr.

Definition at line 135 of file function1Base.H.

References Foam::noexcept, and obrPtr_.

Referenced by mesh().

Here is the caller graph for this function:

◆ resetDb() [1/2]

void resetDb ( const objectRegistry * obrPtr = nullptr)
noexcept

Reset the associated objectRegistry.

Definition at line 116 of file function1Base.C.

References obrPtr_.

◆ resetDb() [2/2]

void resetDb ( const objectRegistry & db)
noexcept

Reset the associated objectRegistry.

Definition at line 122 of file function1Base.C.

References obrPtr_.

◆ obr()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isTime()

bool isTime ( ) const
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_.

◆ time()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mesh()

template<class MeshType>
const MeshType & mesh ( const word & regionName = word::null) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ userTimeToTime()

void userTimeToTime ( const Time & t)
virtual

Convert time.

Reimplemented in Polynomial< Type >, ramp, Sine< Type >, and TableBase< Type >.

Definition at line 128 of file function1Base.C.

Member Data Documentation

◆ name_

const word name_
protected

◆ obrPtr_

const objectRegistry* obrPtr_
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().


The documentation for this class was generated from the following files: