Apache Ignite C++
Public Member Functions | Friends | List of all members
ignite::ConstReference< T > Class Template Reference

Constant Reference class. More...

#include <reference.h>

Public Member Functions

 ConstReference ()
 Default constructor.
 
 ConstReference (common::ConstReferenceImplBase *ptr, ptrdiff_t offset=0)
 Constructor. More...
 
 ConstReference (const ConstReference &other)
 Copy constructor. More...
 
template<typename T2 >
 ConstReference (const ConstReference< T2 > &other)
 Copy constructor. More...
 
ConstReferenceoperator= (const ConstReference &other)
 Assignment operator. More...
 
template<typename T2 >
ConstReferenceoperator= (const ConstReference< T2 > &other)
 Assignment operator. More...
 
 ~ConstReference ()
 Destructor.
 
const T * Get () const
 Dereference the pointer. More...
 
bool IsNull () const
 Check if the pointer is null. More...
 

Friends

template<typename >
class Reference
 

Detailed Description

template<typename T>
class ignite::ConstReference< T >

Constant Reference class.

Abstraction on any reference-type object, from simple raw pointers and references to standard library smart pointers. Provides only constant access to the underlying data.

There are no requirements for the template type T.

Constructor & Destructor Documentation

◆ ConstReference() [1/3]

template<typename T >
ignite::ConstReference< T >::ConstReference ( common::ConstReferenceImplBase *  ptr,
ptrdiff_t  offset = 0 
)
inlineexplicit

Constructor.

Parameters
ptrConstReference class implementation.
offsetPointer offset.

◆ ConstReference() [2/3]

template<typename T >
ignite::ConstReference< T >::ConstReference ( const ConstReference< T > &  other)
inline

Copy constructor.

Parameters
otherAnother instance.

◆ ConstReference() [3/3]

template<typename T >
template<typename T2 >
ignite::ConstReference< T >::ConstReference ( const ConstReference< T2 > &  other)
inline

Copy constructor.

Constant reference of type T2 should be static-castable to constant reference of type T.

Parameters
otherAnother instance.

Member Function Documentation

◆ Get()

template<typename T >
const T* ignite::ConstReference< T >::Get ( ) const
inline

Dereference the pointer.

If the pointer is null then this operation causes undefined behaviour.

Returns
Constant reference to underlying value.

◆ IsNull()

template<typename T >
bool ignite::ConstReference< T >::IsNull ( ) const
inline

Check if the pointer is null.

Returns
True if the value is null.

◆ operator=() [1/2]

template<typename T >
ConstReference& ignite::ConstReference< T >::operator= ( const ConstReference< T > &  other)
inline

Assignment operator.

Parameters
otherAnother instance.

◆ operator=() [2/2]

template<typename T >
template<typename T2 >
ConstReference& ignite::ConstReference< T >::operator= ( const ConstReference< T2 > &  other)
inline

Assignment operator.

Constant reference of type T2 should be static-castable to constant reference of type T.

Parameters
otherAnother instance.

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