PLaSK library

Loading...
Searching...
No Matches
Public Member Functions | List of all members
plask::XMLWriter::Output Struct Referenceabstract

Base class for output (stream). More...

`#include <plask/utils/xml/writer.hpp>`

Inheritance diagram for plask::XMLWriter::Output:
[legend]

## Public Member Functions
virtual | ~Output ()
virtual void | write (const char *buffer, std::size_t n)=0
| Write bytes from buffer.
template<int n>
void | puts (const char(&str)[n])
| Write `n` - 1 bytes from `str`.
virtual void | put (char c)
| Write one character `c`.
void | newline ()
| Write new line character (end-line) to this output.

## Detailed Description

Base class for output (stream).

Definition at line 51 of file writer.hpp.

## Constructor & Destructor Documentation

## ◆ ~Output()

virtual plask::XMLWriter::Output::~Output | ( |  | ) |
| inline virtual

Definition at line 53 of file writer.hpp.

## Member Function Documentation

## ◆ newline()

void plask::XMLWriter::Output::newline | ( |  | ) |
| inline

Write new line character (end-line) to this output.

Definition at line 82 of file writer.hpp.

## ◆ put()

virtual void plask::XMLWriter::Output::put | ( | char | c | ) |
| inline virtual

Write one character `c`.

Default implementation calls: `write(&c, 1);`

Parameters

  c | character to write

Reimplemented in plask::OStreamOutput< ostream_t >.

Definition at line 77 of file writer.hpp.

## ◆ puts()

template<int n>

void plask::XMLWriter::Output::puts | ( | const char(&) | str[n] | ) |
| inline

Write `n` - 1 bytes from `str`.

Useful to writing const char[] literals.

Parameters

  str | string, typically const char[] literal

Definition at line 69 of file writer.hpp.

## ◆ write()

virtual void plask::XMLWriter::Output::write | ( | const char * | buffer,
|  | std::size_t | n
| ) |  |
| pure virtual

Write
bytes from buffer.

Parameters

  buffer | buffer with data with size `n` or more
  n | number of bytes to write

Implemented in plask::OStreamOutput< ostream_t >, and plask::CFileOutput.

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

- plask/utils/xml/writer.hpp