#include <coder.hpp>
|
| virtual | ~Decoder ()=default |
| |
| bool | decode_string (const std::string &encoded, std::string &decoded) |
| |
| bool | decode_file (const std::filesystem::path &encoded, const std::filesystem::path &decoded) |
| |
|
| virtual bool | decode_internal (std::istream &encoded, std::ostream &decoded)=0 |
| |
Virtual interface to decode a string or file with a plaintext decoder. Coders for specific algorithms should inherit from this class to perform decoding.
- Author
- Timothy Flynn (trfly.nosp@m.nn89.nosp@m.@pm.m.nosp@m.e)
- Version
- July 7, 2019
◆ ~Decoder()
| virtual fly::coders::Decoder::~Decoder |
( |
| ) |
|
|
virtualdefault |
◆ decode_file()
| bool fly::coders::Decoder::decode_file |
( |
const std::filesystem::path & |
encoded, |
|
|
const std::filesystem::path & |
decoded |
|
) |
| |
Decode a file.
- Parameters
-
| encoded | Path holding the contents to decode. |
| decoded | Path to store the decoded contents. |
- Returns
- True if the input file was successfully decoded.
◆ decode_internal()
| virtual bool fly::coders::Decoder::decode_internal |
( |
std::istream & |
encoded, |
|
|
std::ostream & |
decoded |
|
) |
| |
|
protectedpure virtual |
Decode a stream.
- Parameters
-
| encoded | Stream holding the contents to decode. |
| decoded | Stream to store the decoded contents. |
- Returns
- bool True if the input stream was successfully decoded.
Implemented in fly::coders::Base64Coder, and fly::coders::BinaryDecoder.
◆ decode_string()
| bool fly::coders::Decoder::decode_string |
( |
const std::string & |
encoded, |
|
|
std::string & |
decoded |
|
) |
| |
Decode a string.
- Parameters
-
| encoded | String holding the contents to decode. |
| decoded | String to store the decoded contents. |
- Returns
- True if the input string was successfully decoded.
The documentation for this class was generated from the following files: