CONZEPT 16 C++ API
C16::Text::StreamOutput Class Reference

Output stream for writing texts. More...

#include "C16/Text.hpp"

Inheritance diagram for C16::Text::StreamOutput:
C16::Text::Stream

Detailed Description

Output stream for writing texts.

Examples

Usage

#include "C16/Library.hpp"
using namespace C16;
void text_stream_output_usage(Text& text)
{
Text::StreamOutput text_stream_output(text);
// Writes a string to the text.
text << "abc\n";
// Writes an integer to the text.
text << 123 << '\n';
}
See also
content_set

Public Member Functions

 StreamOutput ()
 Constructs an output stream. More...
 
 StreamOutput (Text &text)
 Constructs an output stream and associates a text buffer with it. More...
 
Texttext ()
 Gets the text buffer associated with the stream, if associated. More...
 
void associate (Text &text)
 Associates a text buffer with the output stream. More...
 
- Public Member Functions inherited from C16::Text::Stream
bool associated () const
 Gets if there is text buffer associated with the stream. More...
 
const Texttext () const
 Gets the text buffer associated with the stream, if associated. More...
 
void dissociate ()
 Dissociates an associated text buffer from the stream. More...
 
LineBreak line_break () const
 Gets the line break of the stream. More...
 
void line_break_set (LineBreak line_break)
 Sets the line break of the stream. More...
 

Constructor & Destructor Documentation

◆ StreamOutput() [1/2]

C16::Text::StreamOutput::StreamOutput ( )

Constructs an output stream.

◆ StreamOutput() [2/2]

C16::Text::StreamOutput::StreamOutput ( Text text)
explicit

Constructs an output stream and associates a text buffer with it.

Parameters
textText buffer to associate

Member Function Documentation

◆ text()

Text* C16::Text::StreamOutput::text ( )

Gets the text buffer associated with the stream, if associated.

◆ associate()

void C16::Text::StreamOutput::associate ( Text text)

Associates a text buffer with the output stream.

Parameters
textText buffer
Note
Has no effect if there already is a text buffer associated with the output stream.
C16::Text::StreamOutput::text
Text * text()
Gets the text buffer associated with the stream, if associated.
C16::Text
Text buffer to operate on texts of a database.
Definition: Text.hpp:64
Library.hpp
CONZEPT 16 C++ API.
C16::Text::StreamOutput
Output stream for writing texts.
Definition: Text.hpp:945
C16
Namespace.
Definition: Array.hpp:6