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:1089
_ElemType * _M_ElemArray
Definition: concrt.h:1088
#define NULL
Definition: corecrt.h:158
template<typename _ElemType>
virtual Concurrency::details::_MallocaArrayHolder< _ElemType >::~_MallocaArrayHolder ( )
inlinevirtual
1079  {
1080  for( size_t _I=0; _I < _M_ElemsConstructed; ++_I )
1081  {
1082  _M_ElemArray[_I].~_ElemType();
1083  }
1084  // Works even when object was not initialized, that is, _M_ElemArray == NULL
1086  }
size_t _M_ElemsConstructed
Definition: concrt.h:1089
__inline void __CRTDECL _freea(_Pre_maybenull_ _Post_invalid_ void *_Memory)
Definition: malloc.h:147
_ElemType * _M_ElemArray
Definition: concrt.h:1088
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
1073  {
1074  _CONCRT_ASSERT(_M_ElemArray != NULL); // must already be initialized
1076  }
size_t _M_ElemsConstructed
Definition: concrt.h:1089
#define _CONCRT_ASSERT(x)
Definition: concrt.h:123
_ElemType * _M_ElemArray
Definition: concrt.h:1088
#define NULL
Definition: corecrt.h:158
template<typename _ElemType>
void Concurrency::details::_MallocaArrayHolder< _ElemType >::_Initialize ( _ElemType *  _Elem)
inline
1052  {
1053  // The object must be initialized exactly once
1055  _M_ElemArray = _Elem;
1056  _M_ElemsConstructed = 0;
1057  }
size_t _M_ElemsConstructed
Definition: concrt.h:1089
#define _CONCRT_ASSERT(x)
Definition: concrt.h:123
_ElemType * _M_ElemArray
Definition: concrt.h:1088
#define NULL
Definition: corecrt.h:158
template<typename _ElemType>
_ElemType* Concurrency::details::_MallocaArrayHolder< _ElemType >::_InitOnRawMalloca ( void _MallocaRet)
inline
1063  {
1064  if (_MallocaRet == nullptr)
1065  throw std::bad_alloc();
1066  _Initialize(static_cast<_ElemType *>(_MallocaRet));
1067  return static_cast<_ElemType *>(_MallocaRet);
1068  }
void _Initialize(_ElemType *_Elem)
Definition: concrt.h:1051
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: