NSVD Reader  0.0.1
nodamushi::svd::reg_or_cluster< REG, CLUSTER > Struct Template Reference

unique_ptr<Register> or unique_ptr<Cluster> More...

#include <reg_or_cluster.hpp>

Public Types

using reg_t = REG
 
using clu_t = CLUSTER
 
using deleter = std::function< void(void *)>
 

Public Member Functions

 reg_or_cluster (const reg_or_cluster &)=delete
 
reg_or_clusteroperator= (const reg_or_cluster &)=delete
 
 reg_or_cluster (reg_or_cluster &&)=default
 
reg_or_clusteroperator= (reg_or_cluster &&)=default
 
 reg_or_cluster (reg_t *r)
 
 reg_or_cluster (clu_t *c)
 
bool is_register () const noexcept
 
bool is_cluster () const noexcept
 
reg_tget_register ()
 
clu_tget_cluster ()
 
const reg_tget_register () const
 
const clu_tget_cluster () const
 
const void * get ()
 

Detailed Description

template<typename REG, typename CLUSTER>
struct nodamushi::svd::reg_or_cluster< REG, CLUSTER >

unique_ptr<Register> or unique_ptr<Cluster>

Definition at line 22 of file reg_or_cluster.hpp.

Member Typedef Documentation

◆ clu_t

template<typename REG, typename CLUSTER>
using nodamushi::svd::reg_or_cluster< REG, CLUSTER >::clu_t = CLUSTER

Definition at line 25 of file reg_or_cluster.hpp.

◆ deleter

template<typename REG, typename CLUSTER>
using nodamushi::svd::reg_or_cluster< REG, CLUSTER >::deleter = std::function<void(void*)>

Definition at line 26 of file reg_or_cluster.hpp.

◆ reg_t

template<typename REG, typename CLUSTER>
using nodamushi::svd::reg_or_cluster< REG, CLUSTER >::reg_t = REG

Definition at line 24 of file reg_or_cluster.hpp.

Constructor & Destructor Documentation

◆ reg_or_cluster() [1/4]

template<typename REG, typename CLUSTER>
nodamushi::svd::reg_or_cluster< REG, CLUSTER >::reg_or_cluster ( const reg_or_cluster< REG, CLUSTER > &  )
delete

◆ reg_or_cluster() [2/4]

template<typename REG, typename CLUSTER>
nodamushi::svd::reg_or_cluster< REG, CLUSTER >::reg_or_cluster ( reg_or_cluster< REG, CLUSTER > &&  )
default

◆ reg_or_cluster() [3/4]

template<typename REG, typename CLUSTER>
nodamushi::svd::reg_or_cluster< REG, CLUSTER >::reg_or_cluster ( reg_t r)
inline

Definition at line 34 of file reg_or_cluster.hpp.

◆ reg_or_cluster() [4/4]

template<typename REG, typename CLUSTER>
nodamushi::svd::reg_or_cluster< REG, CLUSTER >::reg_or_cluster ( clu_t c)
inline

Definition at line 36 of file reg_or_cluster.hpp.

Member Function Documentation

◆ get()

template<typename REG, typename CLUSTER>
const void* nodamushi::svd::reg_or_cluster< REG, CLUSTER >::get ( )
inline

Definition at line 108 of file reg_or_cluster.hpp.

◆ get_cluster() [1/2]

template<typename REG, typename CLUSTER>
clu_t& nodamushi::svd::reg_or_cluster< REG, CLUSTER >::get_cluster ( )
inline

get as cluster

Exceptions
runtime_error

Definition at line 66 of file reg_or_cluster.hpp.

◆ get_cluster() [2/2]

template<typename REG, typename CLUSTER>
const clu_t& nodamushi::svd::reg_or_cluster< REG, CLUSTER >::get_cluster ( ) const
inline

get as cluster

Exceptions
runtime_error

Definition at line 96 of file reg_or_cluster.hpp.

◆ get_register() [1/2]

template<typename REG, typename CLUSTER>
reg_t& nodamushi::svd::reg_or_cluster< REG, CLUSTER >::get_register ( )
inline

get as register

Exceptions
runtime_error

Definition at line 51 of file reg_or_cluster.hpp.

◆ get_register() [2/2]

template<typename REG, typename CLUSTER>
const reg_t& nodamushi::svd::reg_or_cluster< REG, CLUSTER >::get_register ( ) const
inline

get as register

Exceptions
runtime_error

Definition at line 81 of file reg_or_cluster.hpp.

◆ is_cluster()

template<typename REG, typename CLUSTER>
bool nodamushi::svd::reg_or_cluster< REG, CLUSTER >::is_cluster ( ) const
inlinenoexcept
Returns
is cluster pointer

Definition at line 46 of file reg_or_cluster.hpp.

◆ is_register()

template<typename REG, typename CLUSTER>
bool nodamushi::svd::reg_or_cluster< REG, CLUSTER >::is_register ( ) const
inlinenoexcept
Returns
is register pointer

Definition at line 42 of file reg_or_cluster.hpp.

◆ operator=() [1/2]

template<typename REG, typename CLUSTER>
reg_or_cluster& nodamushi::svd::reg_or_cluster< REG, CLUSTER >::operator= ( const reg_or_cluster< REG, CLUSTER > &  )
delete

◆ operator=() [2/2]

template<typename REG, typename CLUSTER>
reg_or_cluster& nodamushi::svd::reg_or_cluster< REG, CLUSTER >::operator= ( reg_or_cluster< REG, CLUSTER > &&  )
default

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