ObjectConstructor< T, hasCopyFrom > Class Template Reference

#include <apibase.h>

Public Member Functions

 if (dst->CopyFrom(src)==FAILED)
 

Static Public Member Functions

static Result< void > Copy (T &dst, const T &src)
 
template<typename U >
static __attribute__ ((always_inline)) Result< void > AssignCopy(T &dst
 
static __attribute__ ((always_inline)) T *Alloc(void *mem
 
template<typename SRC >
static __attribute__ ((always_inline)) T *Alloc(void *mem
 

Public Attributes

static const U & src
 
static const T & src
 
T * dst
 
return dst
 
static SRC && src
 

Member Function Documentation

◆ Copy()

static Result<void> Copy ( T &  dst,
const T &  src 
)
static

Constructs an object using CopyFrom() (like new (dst) T(src) but with error check) If copy construction fails the object will be automatically destructed, dst will point to uninitialized memory like before the call.

Parameters
[out]dstCopied object will be placed here.
[in]srcObject to be copied.
Returns
OK on success.

◆ __attribute__() [1/3]

static __attribute__ ( (always_inline)  ) &
static

Copy assignment using CopyFrom()

Parameters
[out]dstCopy will be placed here (dst must have already been constructed)
[in]srcObject to be moved.
Returns
OK on success.

◆ __attribute__() [2/3]

static __attribute__ ( (always_inline)  )
static

◆ if()

if ( dst->  CopyFromsrc = FAILED)

◆ __attribute__() [3/3]

static __attribute__ ( (always_inline)  )
static

Member Data Documentation

◆ src [1/3]

const U& src

◆ src [2/3]

const T& src

◆ dst [1/2]

T* dst

◆ dst [2/2]

return dst

◆ src [3/3]

SRC&& src