FileComparator {verifyr2}R Documentation

FileComparator.R

Description

FileComparator.R

FileComparator.R

Details

Comparator 'abstract' class containing the generic comparison methods and handling for high level checks (like file existence). This class should never be instantiated - doing that and calling the comparison methods will lead to error.

Public fields

file1

file1

file2

file2

file1_contents_list

file1 contents

file2_contents_list

file2 contents

summary_comparison

summary comparison result

details_comparison

details comparison result

debugger

debugger instance

Methods

Public methods


Method new()

Initialize a FileComparator instance

Usage
FileComparator$new(file1 = NULL, file2 = NULL)
Arguments
file1

First file to compare.

file2

Second file to compare.


Method vrf_summary()

Method for comparing the file summary information. This method is intended to be implemented only this class level. For comparator specific rules, the internal method vrf_summary_inner should be customized on lower levels instead.

Usage
FileComparator$vrf_summary(config, omit = NULL)
Arguments
config

configuration values

omit

string pattern to omit from the comparison


Method vrf_details()

Method for comparing the file details information. This method is intended to be implemented only this class level. For comparator specific rules, the internal method vrf_summary_inner should be customized on lower levels instead.

Usage
FileComparator$vrf_details(config, omit = NULL)
Arguments
config

configuration values

omit

string pattern to omit from the comparison


Method vrf_summary_inner()

"Abstract" method for comparing the inner part for the summary. This method has to be overwritten by more specialized comparator classes. This method is intended to be called only by the comparator classes in the processing and shouldn't be called directly by the user.

Usage
FileComparator$vrf_summary_inner(config, omit)
Arguments
config

configuration values

omit

string pattern to omit from the comparison


Method vrf_details_inner()

"Abstract" method for comparing the inner part for the detailsThis method has to be overwritten by more specialized comparator classes. This method is intended to be called only by the comparator classes in the processing and shouldn't be called directly by the user.

Usage
FileComparator$vrf_details_inner(config, omit)
Arguments
config

configuration values

omit

string pattern to omit from the comparison


Method vrf_details_supported()

Inherited method for indicating whether detailed comparison is available with the current comparator. Returns an empty string if the comparator is is supported, otherwise a string that will be concatenated with the summary string.

Usage
FileComparator$vrf_details_supported(config)
Arguments
config

configuration values


Method vrf_option_value()

Method for getting specific value from the config In the initial version, returns 'NA' if null con is passed.

Usage
FileComparator$vrf_option_value(config, key)
Arguments
config

configuration values

key

key to search from the parameters


Method vrf_open_debug()

Wrapper method for the opening a new debugging instance with Debugger class if debugging is enabled in config class. Creates the used debugger instance if needed.

Usage
FileComparator$vrf_open_debug(message, config)
Arguments
message

message to debug to console

config

configuration values


Method vrf_add_debug()

Wrapper method for the adding a new debugging message with Debugger class.

Usage
FileComparator$vrf_add_debug(message)
Arguments
message

message to debug to console


Method vrf_add_debug_files()

Special method for adding the compared files into debugger stack.

Usage
FileComparator$vrf_add_debug_files()

Method vrf_close_debug()

Wrapper method for the stopping (closing) current debugging instance with Debugger class.

Usage
FileComparator$vrf_close_debug()

Method clone()

The objects of this class are cloneable with this method.

Usage
FileComparator$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package verifyr2 version 1.0.0 Index]