timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
tim::operation::copy< Tp > Struct Template Reference

This operation class is used for copying the object generically. More...

#include "timemory/operations/types/copy.hpp"

+ Collaboration diagram for tim::operation::copy< Tp >:

Public Types

using type = Tp
 

Public Member Functions

 copy (Tp &obj, const Tp &rhs)
 
 copy (Tp *&obj, const Tp *rhs)
 
 copy (Tp *&obj, const std::shared_ptr< Tp > &rhs)
 
 copy (Tp *&obj, const std::unique_ptr< Tp > &rhs)
 
template<typename Up = Tp>
auto operator() (Tp &obj, Up &&v) const
 
template<typename Up = Tp>
auto operator() (Tp *&obj, Up &&v) const
 

Detailed Description

template<typename Tp>
struct tim::operation::copy< Tp >

This operation class is used for copying the object generically.

Definition at line 54 of file copy.hpp.

Member Typedef Documentation

◆ type

template<typename Tp >
using tim::operation::copy< Tp >::type = Tp

Definition at line 56 of file copy.hpp.

Constructor & Destructor Documentation

◆ copy() [1/4]

template<typename Tp >
tim::operation::copy< Tp >::copy ( Tp &  obj,
const Tp &  rhs 
)
inline

Definition at line 60 of file copy.hpp.

60{ (*this)(obj, rhs); }

◆ copy() [2/4]

template<typename Tp >
tim::operation::copy< Tp >::copy ( Tp *&  obj,
const Tp *  rhs 
)
inline

Definition at line 61 of file copy.hpp.

61{ (*this)(obj, rhs); }

◆ copy() [3/4]

template<typename Tp >
tim::operation::copy< Tp >::copy ( Tp *&  obj,
const std::shared_ptr< Tp > &  rhs 
)
inline

Definition at line 62 of file copy.hpp.

62{ (*this)(obj, rhs.get()); }

◆ copy() [4/4]

template<typename Tp >
tim::operation::copy< Tp >::copy ( Tp *&  obj,
const std::unique_ptr< Tp > &  rhs 
)
inline

Definition at line 63 of file copy.hpp.

63{ (*this)(obj, rhs.get()); }

Member Function Documentation

◆ operator()() [1/2]

template<typename Tp >
template<typename Up = Tp>
auto tim::operation::copy< Tp >::operator() ( Tp &  obj,
Up &&  v 
) const
inline

Definition at line 66 of file copy.hpp.

67 {
68 return sfinae(obj, std::forward<Up>(v));
69 }

◆ operator()() [2/2]

template<typename Tp >
template<typename Up = Tp>
auto tim::operation::copy< Tp >::operator() ( Tp *&  obj,
Up &&  v 
) const
inline

Definition at line 72 of file copy.hpp.

73 {
74 return sfinae(obj, std::forward<Up>(v));
75 }

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