Home ⌂Doc Index ◂Up ▴
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 474 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 478 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 476 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 475 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 511 of file _flow_graph_types_impl.h.

511  {
512  _unwind_class guard((pointer_type)value_space);
513  pointer_type vp = reinterpret_cast<pointer_type>(&value_space);
514  for(size_t i = 0; i < N; ++i ) {
515  (void) new(vp++) value_type(other[i]);
516  ++(guard.already_built);
517  }
518  guard.space = NULL;
519  }

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 520 of file _flow_graph_types_impl.h.

520  : WrapperBase() {
521  // we have to do the heavy lifting to copy contents
522  _unwind_class guard((pointer_type)value_space);
523  pointer_type dp = reinterpret_cast<pointer_type>(value_space);
524  pointer_type sp = reinterpret_cast<pointer_type>(const_cast<char *>(other.value_space));
525  for(size_t i = 0; i < N; ++i, ++dp, ++sp) {
526  (void) new(dp) value_type(*sp);
527  ++(guard.already_built);
528  }
529  guard.space = NULL;
530  }

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

◆ ~Wrapper()

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

Definition at line 536 of file _flow_graph_types_impl.h.

536  {
537  // have to destroy explicitly in reverse order
538  pointer_type vp = reinterpret_cast<pointer_type>(&value_space);
539  for(size_t i = N; i > 0 ; --i ) vp[i-1].~value_type();
540  }

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 532 of file _flow_graph_types_impl.h.

532  {
533  (void) new(newSpace) Wrapper(*this); // exceptions handled in copy constructor
534  }

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 502 of file _flow_graph_types_impl.h.

502  {
503  char *vp = const_cast<char *>(value_space);
504  return reinterpret_cast<ArrayType &>(*vp);
505  }

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 484 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 485 of file _flow_graph_types_impl.h.


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

Copyright © 2005-2020 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.