FOSSology
3.2.0rc1
Open Source License Compliance by Open Source Software
|
#include <FossologyUnicodeClean.hpp>
Public Member Functions | |
FossologyUnicodeClean (std::string &source, std::string &destination) | |
virtual | ~FossologyUnicodeClean () |
void | startConvert () |
Private Member Functions | |
const std::string | dirtyRead () |
void | write (const icu::UnicodeString &output) |
Write the string to file/stream. More... | |
void | flush () |
Flush the buffers and reset the internal buffer. More... | |
Private Attributes | |
std::ifstream | sourceFile |
std::ofstream | destinationFile |
std::vector< icu::UnicodeString > | buffer |
size_t | bufferSize |
bool | stopRead |
Class to remove non UTF-8 characters from file or steam and dump to another file or stream
Definition at line 42 of file FossologyUnicodeClean.hpp.
FossologyUnicodeClean::FossologyUnicodeClean | ( | std::string & | source, |
std::string & | destination | ||
) |
Constructor to open the input and output files (if passed). Also reserve the buffer in internal vector
source | Source file path (STDIN if empty) |
destination | Destination file path (STDOUT if empty) |
Definition at line 45 of file FossologyUnicodeClean.cc.
|
virtual |
Destructor to flush the streams and close any open files.
Definition at line 26 of file FossologyUnicodeClean.cc.
|
private |
Read raw input from file or STDIN
Definition at line 100 of file FossologyUnicodeClean.cc.
|
private |
Flush the buffers and reset the internal buffer.
Print the content of internal buffer to appropriate streams and flush them. Then clear the internal buffer and reset the size.
Definition at line 142 of file FossologyUnicodeClean.cc.
void FossologyUnicodeClean::startConvert | ( | ) |
Start the process to read from file/stream -> remove invalid chars -> print to file/stream.
Definition at line 83 of file FossologyUnicodeClean.cc.
|
private |
Write the string to file/stream.
output |
Definition at line 126 of file FossologyUnicodeClean.cc.