function1Base Class Reference

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

Inheritance diagram for function1Base:
[legend]
Collaboration diagram for function1Base:
[legend]

Public Member Functions

 function1Base (const word &entryName, const objectRegistry *obrPtr=nullptr)
 Construct from entry name and optional registry. More...
 
 function1Base (const word &entryName, const dictionary &dict, const objectRegistry *obrPtr=nullptr)
 Construct from entry name, dictionary (unused) and optional registry. More...
 
 function1Base (const function1Base &rhs)
 Copy construct. More...
 
virtual ~function1Base ()
 Destructor. More...
 
const wordname () const noexcept
 The name of the entry. More...
 
const objectRegistrywhichDb () const noexcept
 Return the associated registry or nullptr. More...
 
void resetDb (const objectRegistry *obrPtr=nullptr) noexcept
 Reset the associated objectRegistry. More...
 
void resetDb (const objectRegistry &db) noexcept
 Reset the associated objectRegistry. More...
 
const objectRegistryobr () const
 Return the object registry. More...
 
bool isTime () const noexcept
 Return true if this function was created with the time database. More...
 
const Timetime () const
 Return the time database. More...
 
template<class MeshType >
const MeshType & mesh (const word &regionName=word::null) const
 Return the mesh database if this Function1 was created using a mesh. More...
 
virtual void userTimeToTime (const Time &t)
 Convert time. More...
 
- Public Member Functions inherited from refCount
constexpr refCount () noexcept
 Default construct, initializing count to 0. More...
 
int count () const noexcept
 Return the current reference count. More...
 
bool unique () const noexcept
 Return true if the reference count is zero. More...
 
void operator++ () noexcept
 Increment the reference count. More...
 
void operator++ (int) noexcept
 Increment the reference count. More...
 
void operator-- () noexcept
 Decrement the reference count. More...
 
void operator-- (int) noexcept
 Decrement the reference count. More...
 

Protected Member Functions

void operator= (const function1Base &)=delete
 No copy assignment. More...
 

Protected Attributes

const word name_
 Name of entry. More...
 
const objectRegistryobrPtr_
 Pointer to an object registry. More...
 

Detailed Description

Base class for template-invariant parts of Function1.

Source files

Definition at line 54 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 50 of file function1Base.C.

◆ 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 62 of file function1Base.C.

◆ function1Base() [3/3]

function1Base ( const function1Base rhs)
explicit

Copy construct.

Definition at line 75 of file function1Base.C.

◆ ~function1Base()

~function1Base ( )
virtual

Destructor.

Definition at line 86 of file function1Base.C.

Member Function Documentation

◆ operator=()

void operator= ( const function1Base )
protecteddelete

No copy assignment.

◆ name()

const word & name ( ) const
inlinenoexcept

The name of the entry.

Definition at line 113 of file function1Base.H.

References function1Base::name_.

◆ whichDb()

const objectRegistry * whichDb ( ) const
inlinenoexcept

Return the associated registry or nullptr.

Definition at line 119 of file function1Base.H.

References function1Base::obrPtr_.

Referenced by function1Base::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 123 of file function1Base.C.

Referenced by Function1Expression< Type >::value().

Here is the caller graph for this function:

◆ resetDb() [2/2]

void resetDb ( const objectRegistry db)
noexcept

Reset the associated objectRegistry.

Definition at line 129 of file function1Base.C.

◆ obr()

const Foam::objectRegistry & obr ( ) const

Return the object registry.

FatalError if object registry is not set

Definition at line 92 of file function1Base.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ isTime()

bool isTime ( ) const
noexcept

Return true if this function was created with the time database.

Definition at line 117 of file function1Base.C.

◆ time()

const Foam::Time & time ( ) const

Return the time database.

FatalError if object registry is not set

Definition at line 104 of file function1Base.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ mesh()

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 144 of file function1Base.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, objectRegistry::lookupObject(), regionName, and function1Base::whichDb().

Here is the call 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 135 of file function1Base.C.

Member Data Documentation

◆ name_

const word name_
protected

Name of entry.

Definition at line 69 of file function1Base.H.

Referenced by function1Base::name().

◆ obrPtr_

const objectRegistry* obrPtr_
protected

Pointer to an object registry.

Definition at line 72 of file function1Base.H.

Referenced by function1Base::whichDb().


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