KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Encodes given iterator data to base 64 string representation. More...
#include <base_64_encoded_output.h>
Classes | |
class | ByteIterator |
A forward iterator that iterates over bytes in a sequence. More... | |
Public Types | |
Type definitions | |
using | IndexType = std::size_t |
The index type. More... | |
Public Member Functions | |
Life cycle | |
} | |
Base64EncodedOutput (std::ostream &rOStream) | |
Constructor. More... | |
~Base64EncodedOutput () | |
Destructor. More... | |
Public operations | |
template<typename TIteratorType , std::enable_if_t< std::is_base_of_v< std::input_iterator_tag, typename std::iterator_traits< TIteratorType >::iterator_category >, bool > = true> | |
void | WriteData (TIteratorType Begin, const IndexType N) |
writes the iterator data to the given output stream More... | |
Encodes given iterator data to base 64 string representation.
Encode incoming data to base 64 string representation.
Input data is read from chunks of consecutive iterators. Non-consecutive iterators can be processed by repeatedly calling Base64EncodedOutput::WriteOutputData.
using Kratos::Base64EncodedOutput::IndexType = std::size_t |
The index type.
|
inline |
Constructor.
This constructor initializes a Base64EncodedOutput object with the specified output stream. The encoded data will be written to the provided output stream during encoding operations.
rOStream | The output stream where the encoded data will be written. |
Kratos::Base64EncodedOutput::~Base64EncodedOutput | ( | ) |
Destructor.
This destructor finalizes the encoding process by handling any remaining bytes and padding at the end of the data. It ensures that the encoded data is correctly written to the output stream before the object is destroyed.
|
inline |
writes the iterator data to the given output stream
This method continues writing the data given by the Begin iterator to the speified rOutput stream in the base64 format.
TIteratorType | Type of the iterator. Should satisfy requirements for std::input_iterator. |
Begin | Begining of the iterator. |
N | Number of data items in the data collection represented by the Begin iterator. |