Poster of Linux kernelThe best gift for a Linux geek
__gnu_cxx::temporary_buffer

__gnu_cxx::temporary_buffer

Section: C Library Functions (3) Updated: 27 Aug 2009
Local index Up
 

NAME

__gnu_cxx::temporary_buffer -  

SYNOPSIS


Inherits std::_Temporary_buffer< _ForwardIterator, _Tp >.  

Public Types


typedef pointer iterator

typedef value_type * pointer

typedef ptrdiff_t size_type

typedef _Tp value_type
 

Public Member Functions


iterator begin ()

iterator end ()

size_type requested_size () const

size_type size () const

temporary_buffer (_ForwardIterator __first, _ForwardIterator __last)

~temporary_buffer ()
 

Protected Member Functions


void _M_initialize_buffer (const _Tp &val, __false_type)

void _M_initialize_buffer (const _Tp &, __true_type)
 

Protected Attributes


pointer _M_buffer

size_type _M_len

size_type _M_original_len
 

Detailed Description

 

template<class _ForwardIterator, class _Tp = typename std::iterator_traits<_ForwardIterator>::value_type> struct __gnu_cxx::temporary_buffer< _ForwardIterator, _Tp >

This class provides similar behavior and semantics of the standard functions get_temporary_buffer() and return_temporary_buffer(), but encapsulated in a type vaguely resembling a standard container.

By default, a temporary_buffer<Iter> stores space for objects of whatever type the Iter iterator points to. It is constructed from a typical [first,last) range, and provides the begin(), end(), size() functions, as well as requested_size(). For non-trivial types, copies of *first will be used to initialize the storage.

malloc is used to obtain underlying storage.

Like get_temporary_buffer(), not all the requested memory may be available. Ideally, the created buffer will be large enough to hold a copy of [first,last), but if size() is less than requested_size(), then this didn't happen.

Definition at line 186 of file ext/memory.  

Constructor & Destructor Documentation

 

temporary_buffer (_ForwardIterator __first, _ForwardIterator __last) [inline]

Requests storage large enough to hold a copy of [first,last).

Definition at line 189 of file ext/memory.  

~temporary_buffer () [inline]

Destroys objects and frees storage.

Definition at line 193 of file ext/memory.  

Member Function Documentation

 

iterator begin () [inline, inherited]

As per Table mumble.

Definition at line 112 of file stl_tempbuf.h.  

iterator end () [inline, inherited]

As per Table mumble.

Definition at line 117 of file stl_tempbuf.h.  

size_type requested_size () const [inline, inherited]

Returns the size requested by the constructor; may be >size().

Definition at line 107 of file stl_tempbuf.h.  

size_type size () const [inline, inherited]

As per Table mumble.

Definition at line 102 of file stl_tempbuf.h.

 

Author

Generated automatically by Doxygen for libstdc++ from the source code.


 

Index

NAME
SYNOPSIS
Public Types
Public Member Functions
Protected Member Functions
Protected Attributes
Detailed Description
template<class _ForwardIterator, class _Tp = typename std::iterator_traits<_ForwardIterator>::value_type> struct __gnu_cxx::temporary_buffer< _ForwardIterator, _Tp >
Constructor & Destructor Documentation
temporary_buffer (_ForwardIterator __first, _ForwardIterator __last) [inline]
~temporary_buffer () [inline]
Member Function Documentation
iterator begin () [inline, inherited]
iterator end () [inline, inherited]
size_type requested_size () const [inline, inherited]
size_type size () const [inline, inherited]
Author

This document was created by man2html, using the manual pages.
Time: 22:37:27 GMT, April 16, 2011