Classes | Public Member Functions | Static Public Attributes | List of all members
NullObject Class Reference

Singleton null-object class and instance. More...

Collaboration diagram for NullObject:
Collaboration graph
[legend]

Public Member Functions

const void * pointer () const
 
unsigned long value () const
 
bool empty () const
 
label size () const
 
const NullObjecttoc () const
 
const NullObjectsortedToc () const
 
template<class T >
const NullObjectoperator= (const T &) const
 

Static Public Attributes

static const NullObject nullObject
 

Detailed Description

Singleton null-object class and instance.

Its contents occupy enough space to also be reinterpreted as another class with a null pointer or zero long for its first member, with additional zero parameters for safe casting to List etc.

Source files

Definition at line 56 of file nullObject.H.

Member Function Documentation

◆ pointer()

const void* pointer ( ) const
inline

Definition at line 99 of file nullObject.H.

◆ value()

unsigned long value ( ) const
inline

Definition at line 105 of file nullObject.H.

◆ empty()

bool empty ( ) const
inline

Definition at line 111 of file nullObject.H.

◆ size()

label size ( ) const
inline

Definition at line 117 of file nullObject.H.

◆ toc()

const NullObject& toc ( ) const
inline

Definition at line 123 of file nullObject.H.

◆ sortedToc()

const NullObject& sortedToc ( ) const
inline

Definition at line 129 of file nullObject.H.

◆ operator=()

const NullObject& operator= ( const T ) const
inline

Definition at line 139 of file nullObject.H.

Member Data Documentation

◆ nullObject

const Foam::NullObject nullObject
static

Definition at line 93 of file nullObject.H.


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