IN2OSM  1.0.1
stringbuffer.h File Reference
#include "stream.h"
#include "internal/stack.h"
Include dependency graph for stringbuffer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GenericStringBuffer< Encoding, Allocator >
 Represents an in-memory output stream. More...
 

Typedefs

typedef GenericStringBuffer< UTF8<> > StringBuffer
 String buffer with UTF8 encoding. More...
 

Functions

template<typename Encoding , typename Allocator >
void PutReserve (GenericStringBuffer< Encoding, Allocator > &stream, size_t count)
 
template<typename Encoding , typename Allocator >
void PutUnsafe (GenericStringBuffer< Encoding, Allocator > &stream, typename Encoding::Ch c)
 
template<>
void PutN (GenericStringBuffer< UTF8<> > &stream, char c, size_t n)
 Implement specialized version of PutN() with memset() for better performance. More...
 

Typedef Documentation

◆ StringBuffer

String buffer with UTF8 encoding.

Definition at line 97 of file stringbuffer.h.

Function Documentation

◆ PutN()

void PutN ( GenericStringBuffer< UTF8<> > &  stream,
char  c,
size_t  n 
)
inline

Implement specialized version of PutN() with memset() for better performance.

Definition at line 111 of file stringbuffer.h.

111  {
112  std::memset(stream.stack_.Push<char>(n), c, n * sizeof(c));
113 }
internal::Stack< Allocator > stack_
Definition: stringbuffer.h:88

◆ PutReserve()

void PutReserve ( GenericStringBuffer< Encoding, Allocator > &  stream,
size_t  count 
)
inline

Definition at line 100 of file stringbuffer.h.

100  {
101  stream.Reserve(count);
102 }
void Reserve(size_t count)
Definition: stringbuffer.h:68
Here is the call graph for this function:

◆ PutUnsafe()

void PutUnsafe ( GenericStringBuffer< Encoding, Allocator > &  stream,
typename Encoding::Ch  c 
)
inline

Definition at line 105 of file stringbuffer.h.

105  {
106  stream.PutUnsafe(c);
107 }
void PutUnsafe(Ch c)
Definition: stringbuffer.h:57
Here is the call graph for this function: