C++ Essence Library 0.1.0
A Utility Library for Modern C++ Programming
Loading...
Searching...
No Matches
essence::crypto::ostream Class Reference

An output stream to transform input data by using a chunk processor(i.e. a chunk encryptor). More...

#include <ostream.hpp>

Inheritance diagram for essence::crypto::ostream:

Public Member Functions

 ES_API (CPPESSENCE) ostream()
 Creates an empty instance, of which the initialization is delayed when the open function is called.
 
ES_API(CPPESSENCE) ostream(std ostream (std::string_view path, abstract::chunk_processor processor, openmode mode=out|binary)
 Creates an instance.
 
 ostream (const ostream &)=delete
 
 ostream (ostream &&) noexcept=delete
 
 ES_API (CPPESSENCE) ~ostream() override
 
ostreamoperator= (const ostream &)=delete
 
ostreamoperator= (ostream &&) noexcept=delete
 
 ES_API (CPPESSENCE) bool is_open() const noexcept
 Checks whether the stream is open.
 
void open (std::shared_ptr< std::ostream > output_stream, abstract::chunk_processor processor)
 Resets all internal states and opens a new output stream to write the transformed data.
 
void open (std::string_view path, abstract::chunk_processor processor, openmode mode=out|binary)
 Resets all internal states and opens a new file to write the transformed data.
 
 ES_API (CPPESSENCE) void close() const
 Closes the current file or stream.
 

Detailed Description

An output stream to transform input data by using a chunk processor(i.e. a chunk encryptor).

Constructor & Destructor Documentation

◆ ostream()

ES_API(CPPESSENCE) ostream(std essence::crypto::ostream::ostream ( std::string_view path,
abstract::chunk_processor processor,
openmode mode = out|binary )

Creates an instance.

Parameters
output_streamThe output stream to receive the transformed data.
processorThe chunk processor.

Creates an instance.

Parameters
pathThe path of the output file into which the transformed data will be written.
processorThe chunk processor.
modeThe open mode of the output file.

Member Function Documentation

◆ ES_API()

essence::crypto::ostream::ES_API ( CPPESSENCE ) const
nodiscardnoexcept

Checks whether the stream is open.

Returns
True if the stream is open; otherwise false.

◆ open() [1/2]

void essence::crypto::ostream::open ( std::shared_ptr< std::ostream > output_stream,
abstract::chunk_processor processor )

Resets all internal states and opens a new output stream to write the transformed data.

Parameters
output_streamThe output stream to receive the transformed data.
processorThe chunk processor.

◆ open() [2/2]

void essence::crypto::ostream::open ( std::string_view path,
abstract::chunk_processor processor,
openmode mode = out|binary )

Resets all internal states and opens a new file to write the transformed data.

Parameters
pathThe path of the output file into which the transformed data will be written.
processorThe chunk processor.
modeThe open mode of the output file.

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