Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
StringStreamBuffer< BufferLength, Emitter > Class Template Reference

#include <stream.h>

+ Inheritance diagram for StringStreamBuffer< BufferLength, Emitter >:
+ Collaboration diagram for StringStreamBuffer< BufferLength, Emitter >:

Public Member Functions

 StringStreamBuffer (Emitter emitter)
 
int overflow (int c) override
 
void push_back (char c)
 
std::streamsize xsputn (const char *s, std::streamsize n) override
 
int sync () override
 

Private Attributes

Emitter m_emitter
 
unsigned int buffer_index
 
char buffer [BufferLength]
 

Constructor & Destructor Documentation

◆ StringStreamBuffer()

template<unsigned int BufferLength, typename Emitter = std::function<void(std::string_view)>>
StringStreamBuffer< BufferLength, Emitter >::StringStreamBuffer ( Emitter emitter)
inline

Member Function Documentation

◆ overflow()

template<unsigned int BufferLength, typename Emitter = std::function<void(std::string_view)>>
int StringStreamBuffer< BufferLength, Emitter >::overflow ( int c)
inlineoverride

References StringStreamBuffer< BufferLength, Emitter >::push_back().

+ Here is the call graph for this function:

◆ push_back()

template<unsigned int BufferLength, typename Emitter = std::function<void(std::string_view)>>
void StringStreamBuffer< BufferLength, Emitter >::push_back ( char c)
inline

References StringStreamBuffer< BufferLength, Emitter >::buffer, StringStreamBuffer< BufferLength, Emitter >::buffer_index, and StringStreamBuffer< BufferLength, Emitter >::sync().

Referenced by StringStreamBuffer< BufferLength, Emitter >::overflow(), and StringStreamBuffer< BufferLength, Emitter >::xsputn().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sync()

template<unsigned int BufferLength, typename Emitter = std::function<void(std::string_view)>>
int StringStreamBuffer< BufferLength, Emitter >::sync ( )
inlineoverride

References StringStreamBuffer< BufferLength, Emitter >::buffer, StringStreamBuffer< BufferLength, Emitter >::buffer_index, and StringStreamBuffer< BufferLength, Emitter >::m_emitter.

Referenced by StringStreamBuffer< BufferLength, Emitter >::push_back().

+ Here is the caller graph for this function:

◆ xsputn()

template<unsigned int BufferLength, typename Emitter = std::function<void(std::string_view)>>
std::streamsize StringStreamBuffer< BufferLength, Emitter >::xsputn ( const char * s,
std::streamsize n )
inlineoverride

References StringStreamBuffer< BufferLength, Emitter >::push_back().

+ Here is the call graph for this function:

Member Data Documentation

◆ buffer

template<unsigned int BufferLength, typename Emitter = std::function<void(std::string_view)>>
char StringStreamBuffer< BufferLength, Emitter >::buffer[BufferLength]
private

◆ buffer_index

template<unsigned int BufferLength, typename Emitter = std::function<void(std::string_view)>>
unsigned int StringStreamBuffer< BufferLength, Emitter >::buffer_index
private

◆ m_emitter

template<unsigned int BufferLength, typename Emitter = std::function<void(std::string_view)>>
Emitter StringStreamBuffer< BufferLength, Emitter >::m_emitter
private

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