Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
internal::Wrapper< T[N]> Struct Template Reference

#include <_flow_graph_types_impl.h>

Inheritance diagram for internal::Wrapper< T[N]>:
Collaboration diagram for internal::Wrapper< T[N]>:

Classes

struct  _unwind_class
 

Public Types

typedef T value_type
 
typedef T * pointer_type
 
typedef T ArrayType[N]
 

Public Member Functions

const ArrayTypevalue () const
 
 Wrapper (const ArrayType &other)
 
 Wrapper (const Wrapper &other)
 
void CopyTo (void *newSpace) const __TBB_override
 
 ~Wrapper ()
 
- Public Member Functions inherited from internal::WrapperBase
virtual ~WrapperBase ()
 

Private Member Functions

 Wrapper ()
 

Private Attributes

char value_space [space_size]
 

Static Private Attributes

static const size_t space_size = sizeof(ArrayType) / sizeof(char)
 

Detailed Description

template<typename T, size_t N>
struct internal::Wrapper< T[N]>

Definition at line 460 of file _flow_graph_types_impl.h.

Member Typedef Documentation

◆ ArrayType

template<typename T , size_t N>
typedef T internal::Wrapper< T[N]>::ArrayType[N]

Definition at line 464 of file _flow_graph_types_impl.h.

◆ pointer_type

template<typename T , size_t N>
typedef T* internal::Wrapper< T[N]>::pointer_type

Definition at line 462 of file _flow_graph_types_impl.h.

◆ value_type

template<typename T , size_t N>
typedef T internal::Wrapper< T[N]>::value_type

Definition at line 461 of file _flow_graph_types_impl.h.

Constructor & Destructor Documentation

◆ Wrapper() [1/3]

template<typename T , size_t N>
internal::Wrapper< T[N]>::Wrapper ( )
private

◆ Wrapper() [2/3]

template<typename T , size_t N>
internal::Wrapper< T[N]>::Wrapper ( const ArrayType other)
inlineexplicit

Definition at line 497 of file _flow_graph_types_impl.h.

497  {
498  _unwind_class guard((pointer_type)value_space);
499  pointer_type vp = reinterpret_cast<pointer_type>(&value_space);
500  for(size_t i = 0; i < N; ++i ) {
501  (void) new(vp++) value_type(other[i]);
502  ++(guard.already_built);
503  }
504  guard.space = NULL;
505  }

References internal::Wrapper< T >::value_space, and void.

◆ Wrapper() [3/3]

template<typename T , size_t N>
internal::Wrapper< T[N]>::Wrapper ( const Wrapper< T[N]> &  other)
inlineexplicit

Definition at line 506 of file _flow_graph_types_impl.h.

506  : WrapperBase() {
507  // we have to do the heavy lifting to copy contents
508  _unwind_class guard((pointer_type)value_space);
509  pointer_type dp = reinterpret_cast<pointer_type>(value_space);
510  pointer_type sp = reinterpret_cast<pointer_type>(const_cast<char *>(other.value_space));
511  for(size_t i = 0; i < N; ++i, ++dp, ++sp) {
512  (void) new(dp) value_type(*sp);
513  ++(guard.already_built);
514  }
515  guard.space = NULL;
516  }

References internal::Wrapper< T >::value_space, and void.

◆ ~Wrapper()

template<typename T , size_t N>
internal::Wrapper< T[N]>::~Wrapper ( )
inline

Definition at line 522 of file _flow_graph_types_impl.h.

522  {
523  // have to destroy explicitly in reverse order
524  pointer_type vp = reinterpret_cast<pointer_type>(&value_space);
525  for(size_t i = N; i > 0 ; --i ) vp[i-1].~value_type();
526  }

References internal::Wrapper< T >::value_space.

Member Function Documentation

◆ CopyTo()

template<typename T , size_t N>
void internal::Wrapper< T[N]>::CopyTo ( void newSpace) const
inlinevirtual

Reimplemented from internal::WrapperBase.

Definition at line 518 of file _flow_graph_types_impl.h.

518  {
519  (void) new(newSpace) Wrapper(*this); // exceptions handled in copy constructor
520  }

References void, and internal::Wrapper< T >::Wrapper().

Here is the call graph for this function:

◆ value()

template<typename T , size_t N>
const ArrayType& internal::Wrapper< T[N]>::value ( ) const
inline

Definition at line 488 of file _flow_graph_types_impl.h.

488  {
489  char *vp = const_cast<char *>(value_space);
490  return reinterpret_cast<ArrayType &>(*vp);
491  }

References internal::Wrapper< T >::value_space.

Member Data Documentation

◆ space_size

template<typename T , size_t N>
const size_t internal::Wrapper< T[N]>::space_size = sizeof(ArrayType) / sizeof(char)
staticprivate

Definition at line 470 of file _flow_graph_types_impl.h.

◆ value_space

template<typename T , size_t N>
char internal::Wrapper< T[N]>::value_space[space_size]
private

Definition at line 471 of file _flow_graph_types_impl.h.


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

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.