42 #ifndef Foam_nullObject_H 43 #define Foam_nullObject_H 83 data_{{
nullptr}, {
nullptr}, {
nullptr}, {
nullptr}}
193 inline bool isNull(
const T* ptr)
195 return ptr == NullObjectPtr<T>();
200 inline bool isNull(
const T& obj)
202 return &obj == NullObjectPtr<T>();
210 return ptr != NullObjectPtr<T>();
217 return &obj != NullObjectPtr<T>();
const NullObject & toc() const noexcept
No-op method (for HashTable replacement)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
unsigned long value() const noexcept
Zero valued integer content.
const NullObject & sortedToc() const noexcept
No-op method (for HashTable replacement)
const void * pointer() const noexcept
A nullptr pointer content.
label size() const noexcept
Zero elements.
Typedefs for label/uLabel without requiring label.H.
Istream & operator>>(Istream &, directionInfo &)
static const NullObject nullObject
A unique null object.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool isNull(const T *ptr)
True if ptr is a pointer (of type T) to the nullObject.
OBJstream os(runTime.globalPath()/outputName)
const NullObject * nullObjectPtr
Pointer to the unique nullObject.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
const T * NullObjectPtr()
Pointer (of type T) to the nullObject.
Singleton null-object class and instance.
bool notNull(const T *ptr)
True if ptr is not a pointer (of type T) to the nullObject.
const T & NullObjectRef()
Reference (of type T) to the nullObject.
bool empty() const noexcept
No elements.