|
OpenMS
2.5.0
|
Go to the documentation of this file.
53 const std::string & string_1,
54 const char * string_1_stringified,
55 const std::string & string_2,
56 const char * string_2_stringified);
69 friend void OPENMS_DLLAPI
73 const std::string & string_1,
74 const char * string_1_stringified,
75 const std::string & string_2,
76 const char * string_2_stringified);
78 friend bool OPENMS_DLLAPI
108 const double & getAcceptableRelative()
const;
111 void setAcceptableRelative(
const double rhs);
114 const double & getAcceptableAbsolute()
const;
117 void setAcceptableAbsolute(
const double rhs);
129 void setMatchedWhitelist(
const std::vector< std::pair<std::string, std::string> >& rhs);
132 const std::vector< std::pair<std::string, std::string> >& getMatchedWhitelist()
const;
142 const int & getVerboseLevel()
const;
152 void setVerboseLevel(
const int rhs);
157 const int & getTabWidth()
const;
162 void setTabWidth(
const int rhs);
167 const int & getFirstColumn()
const;
172 void setFirstColumn(
const int rhs);
180 std::ostream & getLogDestination()
const;
192 void setLogDestination(std::ostream & rhs);
201 bool compareStrings(std::string
const & lhs, std::string
const & rhs);
211 bool compareStreams(std::istream & input_1, std::istream & input_2);
227 bool compareFiles(
const std::string & filename_1,
228 const std::string & filename_2);
240 bool compareLines_(std::string
const & line_str_1, std::string
const & line_str_2);
243 void reportSuccess_()
const;
247 void reportFailure_(
char const *
const message)
const;
250 void writeWhitelistCases_(
const std::string & prefix)
const;
254 void readNextLine_(std::istream & input_stream, std::string & line_string,
int & line_number)
const;
257 bool openInputFileStream_(
const std::string & filename, std::ifstream & input_stream)
const;
276 void setToString(
const std::string & s);
279 void updatePosition();
282 void seekGToSavedPosition();
334 void fillFromInputLine(
InputLine& input_line,
const std::string& str_line);
Stores information about characters, numbers, and white spaces loaded from the InputStream.
Definition: FuzzyStringComparator.h:319
Base class for TOPP applications.
Definition: TOPPBase.h:144
bool use_prefix_
use a prefix when reporting
Definition: FuzzyStringComparator.h:365
A method or algorithm argument contains illegal values.
Definition: Exception.h:648
double number
Definition: FuzzyStringComparator.h:321
bool isFileSimilar(const std::string &filename_1, const std::string &filename_2)
Compare files using absdiff_max_allowed and ratio_max_allowed.
StringList whitelist_
Whitelist.
Definition: FuzzyStringComparator.h:368
int tab_width_
Definition: FuzzyStringComparator.h:355
int first_column_
Definition: FuzzyStringComparator.h:356
int verbose_level_
Definition: FuzzyStringComparator.h:354
InputLine input_line_2_
Definition: FuzzyStringComparator.h:295
int line_num_2_
Definition: FuzzyStringComparator.h:298
A more convenient string class.
Definition: String.h:58
double ratio_max_
Maximum ratio of numbers observed so far, see ratio_max_allowed_.
Definition: FuzzyStringComparator.h:310
int line_num_1_
Definition: FuzzyStringComparator.h:297
bool is_number
Definition: FuzzyStringComparator.h:323
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
std::map< String, UInt > whitelist_cases_
Occurrences of whitelist entries.
Definition: FuzzyStringComparator.h:370
std::string input_1_name_
Name of first input e.g., filename.
Definition: FuzzyStringComparator.h:263
void testStringSimilar(const char *file, int line, const std::string &string_1, const char *string_1_stringified, const std::string &string_2, const char *string_2_stringified)
Compare strings using absdiff_max_allowed and ratio_max_allowed.
bool is_status_success_
Has comparison been successful so far? Note: this flag is changed in reportFailure_();.
Definition: FuzzyStringComparator.h:362
Fuzzy comparison of strings, tolerates numeric differences.
Definition: FuzzyStringComparator.h:66
int line_num_2_max_
Definition: FuzzyStringComparator.h:301
std::string input_2_name_
Name of second input e.g., filename.
Definition: FuzzyStringComparator.h:265
Wrapper for the prefix information computed for the failure report.
Definition: FuzzyStringComparator.h:343
Internal exception class.
Definition: FuzzyStringComparator.h:83
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
int line_num_1_max_
Definition: FuzzyStringComparator.h:300
std::string line_str_1_max_
Definition: FuzzyStringComparator.h:303
void setWhitelist(const char *const, const int line, const std::string &whitelist)
set the whitelist_
double absdiff_max_allowed_
Maximum absolute difference of numbers allowed, see absdiff_max_.
Definition: FuzzyStringComparator.h:313
OpenMS::String prefix
Definition: FuzzyStringComparator.h:345
StreamElement_ element_2_
Stores information about characters, numbers, and white spaces loaded from the second input stream.
Definition: FuzzyStringComparator.h:340
unsigned char letter
Definition: FuzzyStringComparator.h:322
double ratio_max_allowed_
Maximum ratio of numbers allowed, see ratio_max_.
Definition: FuzzyStringComparator.h:307
double absdiff_max_
Maximum difference of numbers observed so far, see absdiff_max_allowed_.
Definition: FuzzyStringComparator.h:316
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
std::vector< std::pair< std::string, std::string > > matched_whitelist_
Alternative Whitelist.
Definition: FuzzyStringComparator.h:373
std::ostream * log_dest_
Log and results output goes here.
Definition: FuzzyStringComparator.h:260
int line_column
Definition: FuzzyStringComparator.h:347
InputLine input_line_1_
Definition: FuzzyStringComparator.h:294
bool is_space
Definition: FuzzyStringComparator.h:324
OpenMS::String prefix_whitespaces
Definition: FuzzyStringComparator.h:346
StreamElement_ element_1_
Stores information about characters, numbers, and white spaces loaded from the first input stream.
Definition: FuzzyStringComparator.h:338
std::string line_str_2_max_
Definition: FuzzyStringComparator.h:304
bool is_absdiff_small_
Definition: FuzzyStringComparator.h:352