ReactOS 0.4.15-dev-7924-g5949c20
__iostring_allocator< _CharT > Class Template Reference

#include <_iostream_string.h>

Inheritance diagram for __iostring_allocator< _CharT >:
Collaboration diagram for __iostring_allocator< _CharT >:

Public Types

enum  { _STR_SIZE = 256 }
typedef _Base::size_type size_type
typedef _Base::pointer pointer
- Public Types inherited from allocator< _CharT >
typedef _CharT value_type
typedef _CharT * pointer
typedef const _CharT * const_pointer
typedef _CharT & reference
typedef const _CharT & const_reference
typedef size_t size_type
typedef ptrdiff_t difference_type
- Public Types inherited from __stlport_class< _Tp >
typedef _Tp _Type

Public Member Functions

_CharT * allocate (size_type __n, const void *__ptr=0)
void deallocate (pointer __p, size_type __n)
- Public Member Functions inherited from allocator< _CharT >
 allocator () _STLP_NOTHROW
 allocator (const allocator< _CharT > &) _STLP_NOTHROW
 allocator (__move_source< allocator< _CharT > > src) _STLP_NOTHROW
 ~allocator () _STLP_NOTHROW
pointer address (reference __x) const
const_pointer address (const_reference __x) const
_CharT * allocate (size_type __n, const void *=0)
void deallocate (pointer __p, size_type __n)
void deallocate (pointer __p) const
size_type max_size () const _STLP_NOTHROW
void construct (pointer __p, const_reference __val)
void destroy (pointer __p)
_CharT * _M_allocate (size_type __n, size_type &__allocated_n)

Private Types

enum  { _BUF_SIZE = _STR_SIZE + 1 }
typedef allocator< _CharT > _Base

Private Attributes

_CharT _M_static_buf [_BUF_SIZE]

Detailed Description

template<class _CharT>
class __iostring_allocator< _CharT >

Definition at line 41 of file _iostream_string.h.

Member Typedef Documentation

◆ _Base

template<class _CharT >
typedef allocator<_CharT> __iostring_allocator< _CharT >::_Base

Definition at line 47 of file _iostream_string.h.

◆ pointer

template<class _CharT >
typedef _Base::pointer __iostring_allocator< _CharT >::pointer

Definition at line 52 of file _iostream_string.h.

◆ size_type

template<class _CharT >
typedef _Base::size_type __iostring_allocator< _CharT >::size_type

Definition at line 51 of file _iostream_string.h.

Member Enumeration Documentation

◆ anonymous enum

template<class _CharT >
anonymous enum

Definition at line 43 of file _iostream_string.h.

◆ anonymous enum

template<class _CharT >
anonymous enum

Definition at line 46 of file _iostream_string.h.

Member Function Documentation

◆ allocate()

template<class _CharT >
_CharT * __iostring_allocator< _CharT >::allocate ( size_type  __n,
const void __ptr = 0 

Definition at line 63 of file _iostream_string.h.

63 {
64 if (__n > _BUF_SIZE) {
65 return _Base::allocate(__n, __ptr);
66 }
67 return _M_static_buf;
68 }
return __n
Definition: _algo.h:75
_CharT _M_static_buf[_BUF_SIZE]
_CharT * allocate(size_type __n, const void *=0)
Definition: _alloc.h:301

◆ deallocate()

template<class _CharT >
void __iostring_allocator< _CharT >::deallocate ( pointer  __p,
size_type  __n 

Definition at line 69 of file _iostream_string.h.

69 {
70 if (__p != _M_static_buf) _Base::deallocate(__p, __n);
71 }
void deallocate(pointer __p, size_type __n)
Definition: _alloc.h:317

Member Data Documentation

◆ _M_static_buf

template<class _CharT >
_CharT __iostring_allocator< _CharT >::_M_static_buf[_BUF_SIZE]

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