| Apache Ignite C++

Public Member Functions | Friends | List of all members
ignite::Reference< T > Class Template Reference

Reference class. More...

`#include <reference.h>`

## Public Member Functions
| Reference ()
| Default constructor.
| Reference (common::ReferenceImplBase *ptr, ptrdiff_t offset=0)
| Constructor. More...
| Reference (const Reference &other)
| Copy constructor. More...
template<typename T2 >
| Reference (const Reference< T2 > &other)
| Copy constructor. More...
Reference & | operator= (const Reference &other)
| Assignment operator. More...
template<typename T2 >
Reference & | operator= (const Reference< T2 > &other)
| Assignment operator. More...
| ~Reference ()
| Destructor.
template<typename T2 >
| operator ConstReference< T2 > ()
| Const cast operator. More...
const T * | Get () const
| Dereference the pointer. More...
T * | Get ()
| 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::Reference< T >

Reference class.

Abstraction on any reference-type object, from simple raw pointers and references to standard library smart pointers.

There are no requirements for the template type T.

## Constructor & Destructor Documentation

## ◆ Reference() [1/3]

template<typename T>

ignite::Reference< T >::Reference | ( | common::ReferenceImplBase * | ptr,
|  | ptrdiff_t | offset = `0`
| ) |  |
| inline explicit

Constructor.

Parameters

  ptr | Reference class implementation.
  offset | Pointer offset.

## ◆ Reference() [2/3]

template<typename T>

ignite::Reference< T >::Reference | ( | const Reference< T > & | other | ) |
| inline

Copy constructor.

Parameters

  other | Another instance.

## ◆ Reference() [3/3]

template<typename T>
template<typename T2 >

ignite::Reference< T >::Reference | ( | const Reference< T2 > & | other | ) |
| inline

Copy constructor.

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

Parameters

  other | Another instance.

## Member Function Documentation

## ◆ Get() [1/2]

template<typename T>

const T* ignite::Reference< T >::Get | ( |  | ) | const
| inline

Dereference the pointer.

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

Returns
  Constant pointer to underlying value.

## ◆ Get() [2/2]

template<typename T>

T* ignite::Reference< T >::Get | ( |  | ) |
| inline

Dereference the pointer.

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

Returns
  Reference to underlying value.

## ◆ IsNull()

template<typename T>

bool ignite::Reference< T >::IsNull | ( |  | ) | const
| inline

Check if the pointer is null.

Returns
  True if the value is null.

## ◆ operator ConstReference< T2 >()

template<typename T>
template<typename T2 >

ignite::Reference< T >::operator ConstReference< T2 > | ( |  | ) |
| inline

Const cast operator.

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

Casts this instance to constant reference.

## ◆ operator=() [1/2]

template<typename T>

Reference& ignite::Reference< T >::operator= | ( | const Reference< T > & | other | ) |
| inline

Assignment operator.

Parameters

  other | Another instance.

## ◆ operator=() [2/2]

template<typename T>
template<typename T2 >

Reference& ignite::Reference< T >::operator= | ( | const Reference< T2 > & | other | ) |
| inline

Assignment operator.

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

Parameters

  other | Another instance.

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

- reference.h