HEaaN
Crypto Lab's great homomorphic encryption library
Public Member Functions | Private Attributes | List of all members
HEaaN::Pointer< T > Class Template Reference

A class holding unique_ptr but is copied with deepcopy. More...

#include <Pointer.hpp>

Public Member Functions

template<class... U>
 Pointer (U &&...args)
 
 ~Pointer ()
 
 Pointer (Pointer const &other)
 
 Pointer (Pointer &&other) noexcept
 
Pointeroperator= (const Pointer &other)
 
Pointeroperator= (Pointer &&other) noexcept
 
T & operator* ()
 
T * operator-> ()
 
const T & operator* () const
 
const T * operator-> () const
 

Private Attributes

std::unique_ptr< T > ptr_
 

Detailed Description

template<class T>
class HEaaN::Pointer< T >

A class holding unique_ptr but is copied with deepcopy.

This class helps implementing PIMPL idiom. Include Pointer.tpp in implementation files and instantiate the forward decl-ed class at there like template class Pointer<Impl>;.

Constructor & Destructor Documentation

◆ Pointer() [1/3]

template<class T >
template<class... U>
HEaaN::Pointer< T >::Pointer ( U &&...  args)

◆ ~Pointer()

template<class T >
HEaaN::Pointer< T >::~Pointer ( )

◆ Pointer() [2/3]

template<class T >
HEaaN::Pointer< T >::Pointer ( Pointer< T > const &  other)

◆ Pointer() [3/3]

template<class T >
HEaaN::Pointer< T >::Pointer ( Pointer< T > &&  other)
noexcept

Member Function Documentation

◆ operator*() [1/2]

template<class T >
T& HEaaN::Pointer< T >::operator* ( )

◆ operator*() [2/2]

template<class T >
const T& HEaaN::Pointer< T >::operator* ( ) const

◆ operator->() [1/2]

template<class T >
T* HEaaN::Pointer< T >::operator-> ( )

◆ operator->() [2/2]

template<class T >
const T* HEaaN::Pointer< T >::operator-> ( ) const

◆ operator=() [1/2]

template<class T >
Pointer& HEaaN::Pointer< T >::operator= ( const Pointer< T > &  other)

◆ operator=() [2/2]

template<class T >
Pointer& HEaaN::Pointer< T >::operator= ( Pointer< T > &&  other)
noexcept

Member Data Documentation

◆ ptr_

template<class T >
std::unique_ptr<T> HEaaN::Pointer< T >::ptr_
private

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