VCCC  2024.05
VisualCamp Common C++ library
StreamWrapperBase< String, Stream > Class Template Reference

#include <vccc/__log/stream_wrapper.hpp>

Detailed Description

template<typename String, typename Stream>
class vccc::StreamWrapperBase< String, Stream >

Template Parameters
CharT
String
Stream

Public Types

using stream_type = Stream
 
using string_type = String
 
using traits_type = typename stream_type::traits_type
 

Public Member Functions

const string_typeseparator () const
 Get current separator. More...
 
string_type separator (string_type new_separator)
 Set current separator. More...
 
VCCC_NODISCARD bool quote_string () const noexcept
 
void quote_string (bool new_value) noexcept
 
VCCC_NODISCARD bool expand_aggregate () const noexcept
 
void expand_aggregate (bool new_value) noexcept
 
VCCC_NODISCARD bool expand_array ()
 
void expand_array (bool new_value)
 

Static Public Member Functions

static string_typeglobal_separator ()
 Get global separator. More...
 

Protected Attributes

struct {
   string_type   separator_ = global_separator()
 
   bool   first_ = true
 
   bool   quote_string_ = GlobalStreamWrapperSettings::quote_string()
 
   bool   expand_aggregate_ = GlobalStreamWrapperSettings::expand_aggregate()
 
   bool   expand_array_ = GlobalStreamWrapperSettings::expand_array()
 
}; 
 

Member Typedef Documentation

◆ stream_type

using stream_type = Stream

◆ string_type

using string_type = String

◆ traits_type

using traits_type = typename stream_type::traits_type

Member Function Documentation

◆ expand_aggregate() [1/2]

VCCC_NODISCARD bool expand_aggregate ( ) const
inlinenoexcept

◆ expand_aggregate() [2/2]

void expand_aggregate ( bool  new_value)
inlinenoexcept

◆ expand_array() [1/2]

VCCC_NODISCARD bool expand_array ( )
inline

◆ expand_array() [2/2]

void expand_array ( bool  new_value)
inline

◆ global_separator()

static string_type& global_separator ( )
inlinestatic

Default value is an empty string

Returns
Global separator

◆ quote_string() [1/2]

VCCC_NODISCARD bool quote_string ( ) const
inlinenoexcept

◆ quote_string() [2/2]

void quote_string ( bool  new_value)
inlinenoexcept

◆ separator() [1/2]

const string_type& separator ( ) const
inline

Default-initialized with StreamWrapperBase::global_separator()

Returns
Current separator

◆ separator() [2/2]

string_type separator ( string_type  new_separator)
inline

Set current separator with new value and return the previous one

Returns
Previous separator

Member Data Documentation

◆ 

struct { ... }

◆ expand_aggregate_

◆ expand_array_

◆ first_

bool first_ = true

◆ quote_string_

◆ separator_

string_type separator_ = global_separator()

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