STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Concurrency::details::_MallocaArrayHolder< _ElemType > Class Template Reference

#include <concrt.h>

Public Member Functions

 _MallocaArrayHolder ()
 
void _Initialize (_ElemType *_Elem)
 
_ElemType * _InitOnRawMalloca (void *_MallocaRet)
 
void _IncrementConstructedElemsCount ()
 
virtual ~_MallocaArrayHolder ()
 

Private Member Functions

 _MallocaArrayHolder (const _MallocaArrayHolder &)
 
_MallocaArrayHolderoperator= (const _MallocaArrayHolder &)
 

Private Attributes

_ElemType * _M_ElemArray
 
size_t _M_ElemsConstructed
 

Constructor & Destructor Documentation

template<typename _ElemType>
Concurrency::details::_MallocaArrayHolder< _ElemType >::_MallocaArrayHolder ( )
inline
size_t _M_ElemsConstructed
Definition: concrt.h:1112
#define NULL
Definition: crtdbg.h:30
_ElemType * _M_ElemArray
Definition: concrt.h:1111
template<typename _ElemType>
virtual Concurrency::details::_MallocaArrayHolder< _ElemType >::~_MallocaArrayHolder ( )
inlinevirtual
1102  {
1103  for( size_t _I=0; _I < _M_ElemsConstructed; ++_I )
1104  {
1105  _M_ElemArray[_I]._ElemType::~_ElemType();
1106  }
1107  // Works even when object was not initialized, that is, _M_ElemArray == NULL
1108  _freea(_M_ElemArray);
1109  }
size_t _M_ElemsConstructed
Definition: concrt.h:1112
_ElemType * _M_ElemArray
Definition: concrt.h:1111
template<typename _ElemType>
Concurrency::details::_MallocaArrayHolder< _ElemType >::_MallocaArrayHolder ( const _MallocaArrayHolder< _ElemType > &  )
private

Member Function Documentation

template<typename _ElemType>
void Concurrency::details::_MallocaArrayHolder< _ElemType >::_IncrementConstructedElemsCount ( )
inline
1096  {
1097  _CONCRT_ASSERT(_M_ElemArray != NULL); // must already be initialized
1099  }
size_t _M_ElemsConstructed
Definition: concrt.h:1112
#define _CONCRT_ASSERT(x)
Definition: concrt.h:137
#define NULL
Definition: crtdbg.h:30
_ElemType * _M_ElemArray
Definition: concrt.h:1111
template<typename _ElemType>
void Concurrency::details::_MallocaArrayHolder< _ElemType >::_Initialize ( _ElemType *  _Elem)
inline
1075  {
1076  // The object must be initialized exactly once
1078  _M_ElemArray = _Elem;
1079  _M_ElemsConstructed = 0;
1080  }
size_t _M_ElemsConstructed
Definition: concrt.h:1112
#define _CONCRT_ASSERT(x)
Definition: concrt.h:137
#define NULL
Definition: crtdbg.h:30
_ElemType * _M_ElemArray
Definition: concrt.h:1111
template<typename _ElemType>
_ElemType* Concurrency::details::_MallocaArrayHolder< _ElemType >::_InitOnRawMalloca ( void _MallocaRet)
inline
1086  {
1087  if (_MallocaRet == nullptr)
1088  throw std::bad_alloc();
1089  _Initialize(static_cast<_ElemType *>(_MallocaRet));
1090  return static_cast<_ElemType *>(_MallocaRet);
1091  }
void _Initialize(_ElemType *_Elem)
Definition: concrt.h:1074
template<typename _ElemType>
_MallocaArrayHolder& Concurrency::details::_MallocaArrayHolder< _ElemType >::operator= ( const _MallocaArrayHolder< _ElemType > &  )
private

Member Data Documentation

template<typename _ElemType>
_ElemType* Concurrency::details::_MallocaArrayHolder< _ElemType >::_M_ElemArray
private
template<typename _ElemType>
size_t Concurrency::details::_MallocaArrayHolder< _ElemType >::_M_ElemsConstructed
private

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