STLdoc
STLdocumentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
cliext::_Temp_iterator< _Ty > Class Template Reference

Classes

struct  _Bufpar
 

Public Types

typedef _Temp_iterator< _Ty > _Mytype_t
 
typedef _Ty * _Pty
 
typedef output_iterator_tag iterator_category
 

Public Member Functions

 _Temp_iterator (std::ptrdiff_t _Count=0)
 
 _Temp_iterator (const _Temp_iterator &_Right)
 
 ~_Temp_iterator ()
 
_Temp_iteratoroperator= (const _Temp_iterator &_Right)
 
_Temp_iteratoroperator= (_Ty &_Val)
 
_Temp_iteratoroperator* ()
 
_Temp_iteratoroperator++ ()
 
_Temp_iteratoroperator++ (int)
 
_Temp_iterator_Init ()
 
_Pty _First () const
 
_Pty _Last () const
 
std::ptrdiff_t _Maxlen ()
 

Public Attributes

_Bufpar _Buf
 
_Bufpar_Pbuf
 

Member Typedef Documentation

template<class _Ty >
typedef _Temp_iterator<_Ty> cliext::_Temp_iterator< _Ty >::_Mytype_t
template<class _Ty >
typedef _Ty* cliext::_Temp_iterator< _Ty >::_Pty
template<class _Ty >
typedef output_iterator_tag cliext::_Temp_iterator< _Ty >::iterator_category

Constructor & Destructor Documentation

template<class _Ty >
cliext::_Temp_iterator< _Ty >::_Temp_iterator ( std::ptrdiff_t  _Count = 0)
inline
304  { // construct from desired temporary buffer size
305  _Buf._Begin = 0;
306  _Buf._Current = 0;
307  _Buf._Hiwater = 0;
308  _Buf._Size = _Count; // memorize size for lazy allocation
309  _Pbuf = &_Buf;
310  }
unsigned int _Size() const
Definition: regex:1571
Definition: regex:1559
_Diff _Count
Definition: algorithm:1941
_Bufpar _Buf
Definition: memory:406
_Bufpar * _Pbuf
Definition: memory:407
template<class _Ty >
cliext::_Temp_iterator< _Ty >::_Temp_iterator ( const _Temp_iterator< _Ty > &  _Right)
inline
313  { // construct from _Right (share active buffer)
314  _Buf._Begin = 0; // clear stored buffer, for safe destruction
315  _Buf._Current = 0;
316  _Buf._Hiwater = 0;
317  _Buf._Size = 0;
318  *this = _Right;
319  }
unsigned int _Size() const
Definition: regex:1571
Definition: regex:1559
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty >
cliext::_Temp_iterator< _Ty >::~_Temp_iterator ( )
inline
322  { // destroy the object
323  if (_Buf._Begin != 0)
324  { // destroy any constructed elements in buffer
325  for (_Pty _Next = _Buf._Begin;
326  _Next != _Buf._Hiwater; ++_Next)
327  _Next->~_Ty();
329  }
330  }
void return_temporary_buffer(_Ty *_Pbuf)
Definition: memory:289
Definition: regex:1559
_Ty * _Pty
Definition: memory:300

Member Function Documentation

template<class _Ty >
_Pty cliext::_Temp_iterator< _Ty >::_First ( ) const
inline
373  { // return pointer to beginning of buffer
374  return (_Pbuf->_Begin);
375  }
_Pty _Begin
Definition: memory:400
_Bufpar * _Pbuf
Definition: memory:407
template<class _Ty >
_Temp_iterator& cliext::_Temp_iterator< _Ty >::_Init ( )
inline
367  { // set pointer at beginning of buffer
369  return (*this);
370  }
_Pty _Current
Definition: memory:401
_Pty _Begin
Definition: memory:400
_Bufpar * _Pbuf
Definition: memory:407
template<class _Ty >
_Pty cliext::_Temp_iterator< _Ty >::_Last ( ) const
inline
378  { // return pointer past end of buffer contents
379  return (_Pbuf->_Current);
380  }
_Pty _Current
Definition: memory:401
_Bufpar * _Pbuf
Definition: memory:407
template<class _Ty >
std::ptrdiff_t cliext::_Temp_iterator< _Ty >::_Maxlen ( )
inline
383  { // return size of buffer
384  if (_Pbuf->_Begin == 0 && 0 < _Pbuf->_Size)
385  { // allocate buffer on first size query
387  get_temporary_buffer<_Ty>(_Pbuf->_Size);
388 
389  _Pbuf->_Begin = _Pair.first;
390  _Pbuf->_Current = _Pair.first;
391  _Pbuf->_Hiwater = _Pair.first;
392  _Pbuf->_Size = _Pair.second;
393  }
394  return (_Pbuf->_Size);
395  }
_Ty2 second
Definition: utility:271
_Pty _Current
Definition: memory:401
_Pty _Hiwater
Definition: memory:402
std::ptrdiff_t _Size
Definition: memory:403
_Ty1 first
Definition: utility:270
_Pty _Begin
Definition: memory:400
Definition: utility:92
_Bufpar * _Pbuf
Definition: memory:407
template<class _Ty >
_Temp_iterator& cliext::_Temp_iterator< _Ty >::operator* ( )
inline
352  { // pretend to return designated value
353  return (*this);
354  }
template<class _Ty >
_Temp_iterator& cliext::_Temp_iterator< _Ty >::operator++ ( )
inline
357  { // pretend to preincrement
358  return (*this);
359  }
template<class _Ty >
_Temp_iterator& cliext::_Temp_iterator< _Ty >::operator++ ( int  )
inline
362  { // pretend to postincrement
363  return (*this);
364  }
template<class _Ty >
_Temp_iterator& cliext::_Temp_iterator< _Ty >::operator= ( const _Temp_iterator< _Ty > &  _Right)
inline
333  { // assign _Right (share active buffer)
334  _Pbuf = _Right._Pbuf;
335  return (*this);
336  }
_Bufpar * _Pbuf
Definition: memory:407
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty >
_Temp_iterator& cliext::_Temp_iterator< _Ty >::operator= ( _Ty &  _Val)
inline
339  { // assign or construct value into active buffer, and increment
340  if (_Pbuf->_Current < _Pbuf->_Hiwater)
341  *_Pbuf->_Current++ = _Val; // below high water mark, assign
342  else
343  { // above high water mark, construct
344  _Pty _Ptr = &*_Pbuf->_Current;
345  ::new (_Ptr) _Ty(_Val);
346  _Pbuf->_Hiwater = ++_Pbuf->_Current;
347  }
348  return (*this);
349  }
_Pty _Current
Definition: memory:401
_Pty _Hiwater
Definition: memory:402
_Ty * _Pty
Definition: memory:300
return * this
Definition: variant:950
return(_PAIR_TYPE(_FwdIt)(_First, _First))
_FwdIt const _Ty _Val
Definition: algorithm:1938
_Bufpar * _Pbuf
Definition: memory:407

Member Data Documentation

template<class _Ty >
_Bufpar cliext::_Temp_iterator< _Ty >::_Buf
template<class _Ty >
_Bufpar* cliext::_Temp_iterator< _Ty >::_Pbuf

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