CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
ext::basic_omemstream< Item_t, Traits_t, Allocator_t > Class Template Reference

#include <memstream.h>

Inheritance diagram for ext::basic_omemstream< Item_t, Traits_t, Allocator_t >:

Public Types

typedef Traits_t::char_type char_type
 
typedef Traits_t::int_type int_type
 
typedef Traits_t traits_type
 

Public Member Functions

 basic_omemstream (char_type *buf, size_t size)
 
char_typebegin () const
 
bool empty () const
 
char_typeend () const
 
size_t size () const
 

Private Member Functions

int_type overflow (int_type c) override
 
int sync () override
 
std::streamsize xsputn (char_type const *data, std::streamsize size) override
 

Private Attributes

char_typebuffer
 
char_typecur
 
char_typelast
 

Detailed Description

template<typename Item_t, typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
class ext::basic_omemstream< Item_t, Traits_t, Allocator_t >

Definition at line 22 of file memstream.h.

Member Typedef Documentation

◆ char_type

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef Traits_t::char_type ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::char_type

Definition at line 24 of file memstream.h.

◆ int_type

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef Traits_t::int_type ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::int_type

Definition at line 25 of file memstream.h.

◆ traits_type

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef Traits_t ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::traits_type

Definition at line 26 of file memstream.h.

Constructor & Destructor Documentation

◆ basic_omemstream()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::basic_omemstream ( char_type buf,
size_t  size 
)
inline

Definition at line 28 of file memstream.h.

29  : std::basic_ostream<Item_t, Traits_t>(this), buffer(buf), cur(buf), last(buf + size) {
30  this->exceptions(std::ios_base::badbit);
31  }

Member Function Documentation

◆ begin()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
char_type* ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::begin ( void  ) const
inline

Definition at line 33 of file memstream.h.

33 { return buffer; }

References ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::buffer.

◆ empty()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
bool ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::empty ( void  ) const
inline

◆ end()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
char_type* ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::end ( void  ) const
inline

Definition at line 34 of file memstream.h.

34 { return cur; }

References ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::cur.

◆ overflow()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
int_type ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::overflow ( int_type  c)
inlineoverrideprivate

Definition at line 46 of file memstream.h.

46  {
47  if (!traits_type::eq_int_type(c, traits_type::eof())) {
48  char_type t = traits_type::to_char_type(c);
49  if (xsputn(&t, 1) < 1)
50  return traits_type::eof();
51  }
52 
53  return c;
54  }

References HltBtagPostValidation_cff::c, submitPVValidationJobs::t, and ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::xsputn().

◆ size()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
size_t ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::size ( void  ) const
inline

◆ sync()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
int ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::sync ( )
inlineoverrideprivate

Definition at line 56 of file memstream.h.

56 { return 0; }

◆ xsputn()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
std::streamsize ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::xsputn ( char_type const *  data,
std::streamsize  size 
)
inlineoverrideprivate

Member Data Documentation

◆ buffer

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
char_type* ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::buffer
private

◆ cur

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
char_type * ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::cur
private

◆ last

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
char_type * ext::basic_omemstream< Item_t, Traits_t, Allocator_t >::last
private
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
ext::basic_omemstream::buffer
char_type * buffer
Definition: memstream.h:58
ext::basic_omemstream::char_type
Traits_t::char_type char_type
Definition: memstream.h:24
ext::basic_omemstream::xsputn
std::streamsize xsputn(char_type const *data, std::streamsize size) override
Definition: memstream.h:39
ext::basic_omemstream::cur
char_type * cur
Definition: memstream.h:58
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
ext::basic_omemstream::last
char_type * last
Definition: memstream.h:58
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
ext::basic_omemstream::size
size_t size() const
Definition: memstream.h:35