42#ifndef Foam_nullObject_H
43#define Foam_nullObject_H
83 data_{{
nullptr}, {
nullptr}, {
nullptr}, {
nullptr}}
87 NullObject(
const NullObject&) =
delete;
90 void operator=(
const NullObject&) =
delete;
104 const void*
pointer()
const noexcept
144 const NullObject& operator=(
const T&)
const noexcept
204 return *
reinterpret_cast<T*
>(
const_cast<NullObject*
>(
nullObjectPtr));
210inline bool isNull(
const T* ptr)
noexcept
217inline bool isNull(
const T& obj)
noexcept
225inline bool notNull(
const T* ptr)
noexcept
232inline bool notNull(
const T& obj)
noexcept
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Singleton null-object class and instance.
const NullObject & sortedToc() const noexcept
No-op method (for HashTable replacement).
bool empty() const noexcept
No elements.
const void * pointer() const noexcept
A nullptr pointer content.
const NullObject & operator=(const T &) const noexcept
Swallow assignment (cf, std::ignore).
unsigned long value() const noexcept
Zero valued integer content.
label size() const noexcept
Zero elements.
static const NullObject nullObject
A unique null object.
const NullObject & toc() const noexcept
No-op method (for HashTable replacement).
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
OBJstream os(runTime.globalPath()/outputName)
Typedefs for label/uLabel without requiring label.H.
const T & NullObjectRef() noexcept
Const reference (of type T) to the nullObject.
T * NullObjectPtr_constCast() noexcept
Non-const pointer (of type T) to the nullObject. Only use when nothing will be written into it!
T & NullObjectRef_constCast() noexcept
Non-const reference (of type T) to the nullObject Only use when nothing will be written into it!
const NullObject * nullObjectPtr
Pointer to the unique nullObject.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
const T * NullObjectPtr() noexcept
Const pointer (of type T) to the nullObject.
Istream & operator>>(Istream &, directionInfo &)
bool notNull(const T *ptr) noexcept
True if ptr is not a pointer (of type T) to the nullObject.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
bool isNull(const T *ptr) noexcept
True if ptr is a pointer (of type T) to the nullObject.