CCL 0.2 Beta API Reference
IO Package

Table of Contents


Classes

Free Functions

<cmp/io/general.hpp>
constexpr
std::endian
get_opposite_endianness (
    std::endian endianness
)
noexcept

Returns the endianness opposite to the endianness provided. For example, the opposite of std::endian::big is std::endian::little and vice-versa.

Parameters:
  • endianness:

    The endianness to get the opposite of.

<cmp/io/general.hpp>
void
invert_endianness (
    std::byte* data,
    std::size_t byte_count
)
noexcept

Reverses the order of the bytes in the data array.

Parameters:
  • data:

    The array of bytes to reverse.

  • byte_count:

    The number of bytes in the array.

<cmp/io/output_stream.hpp>
template <
    typename OutputResource
>
output_stream<OutputResource>&
operator << (
    output_stream<OutputResource>& stream,
    flush_t flush_v
)

Flushes the output stream.

Parameters:
  • stream:

    The output stream to flush.

  • flush_v:

    This parameter is only used to indicate that a flush is desired, its value is not actually read.

<cmp/io/text_input_stream.hpp>
template <
    typename InputResource,
    writable_raii_text_object T
>
text_input_stream<InputResource>&
operator >> (
    text_input_stream<InputResource>& stream,
    T& target
)

Reads a Unicode string with the text input stream.

Parameters:
  • stream:

    The text input stream to read with.

  • target:

    The object to store the read data in.

<cmp/io/text_input_stream.hpp>
template <
    typename InputResource,
    std::floating_point T
>
text_input_stream<InputResource>&
operator >> (
    text_input_stream<InputResource>& stream,
    T& target
)

Reads a floating-point value with the text input stream.

Parameters:
  • stream:

    The text input stream to read with.

  • target:

    The object to store the read data in.

<cmp/io/text_input_stream.hpp>
template <
    typename InputResource,
    std::integral T
>
text_input_stream<InputResource>&
operator >> (
    text_input_stream<InputResource>& stream,
    T& target
)

Reads an integral value with the text input stream.

Parameters:
  • stream:

    The text input stream to read with.

  • target:

    The object to store the read data in.

<cmp/io/text_input_stream.hpp>
template <
    typename InputResource
>
text_input_stream<InputResource>&
operator >> (
    text_input_stream<InputResource>& stream,
    bool& target
)

Reads a bool value with the text input stream.

Parameters:
  • stream:

    The text input stream to read with.

  • target:

    The object to store the read data in.

<cmp/io/text_input_stream.hpp>
template <
    typename InputResource
>
text_input_stream<InputResource>&
operator >> (
    text_input_stream<InputResource>& stream,
    char32_t& target
)

Reads a code point with the text input stream.

Parameters:
  • stream:

    The text input stream to read with.

  • target:

    The object to store the read data in.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    const std::u16string_view& source
)

Writes a UTF-16 string with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    const std::u32string_view& source
)

Writes a UTF-32 string with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    const std::u8string_view& source
)

Writes a UTF-8 string with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource,
    std::floating_point T
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    T source
)

Writes a floating-point value with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    const std::string_view& source
)

Writes a string with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    const std::wstring_view& source
)

Writes a wide string with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource,
    std::integral T
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    T source
)

Writes an integral value with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    const char16_t* source
)

Writes a UTF-16 code unit with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    const char32_t* source
)

Writes a UTF-32 code unit with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    const char8_t* source
)

Writes a UTF-8 code unit with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    char source
)

Writes a char value with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    char32_t source
)

Writes a code point with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    const char* source
)

Writes a string with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    const wchar_t* source
)

Writes a wide code unit with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.

<cmp/io/text_output_stream.hpp>
template <
    typename OutputResource
>
text_output_stream<OutputResource>&
operator << (
    text_output_stream<OutputResource>& stream,
    bool source
)

Writes bool value with the text output stream.

Parameters:
  • stream:

    The text output stream to write with.

  • source:

    The object to write.



Copyright © 2022-2025 Daniel T. McGinnis

CCL was first published in 2022, and is still actively maintained.

This website was first published in 2022, and is still actively maintained.

This specific web page was first published in 2023.