wex v25.04.0
wex::unified_diff Class Reference

Offers a class that implements unified_diff report_diff for a vcs entry. More...

#include <wex/vcs/unified-diff.h>

Inheritance diagram for wex::unified_diff:

Public Member Functions

 unified_diff (const path &p, const vcs_entry *entry, factory::frame *f)
 Constructor.
 
const auto & path_vcs () const
 Returns path (from vcs).
 
- Public Member Functions inherited from wex::factory::unified_diff
 unified_diff (const std::string &input=std::string())
 Constructor.
 
size_t differences () const
 Returns number of differences found duing parsing.
 
bool is_first () const
 Returns true if this is the first diff of a chunk.
 
bool is_last () const
 Returns true if this is the last diff of a chunk.
 
bool parse ()
 Parses the input.
 
const auto & path_from () const
 Returns path from.
 
const auto & path_to () const
 Returns path to.
 
const auto & range_from_start () const
 Returns start number for the from file.
 
const auto & range_from_count () const
 Returns count number for the from file.
 
const auto & range_to_start () const
 Returns start number for the to file.
 
const auto & range_to_count () const
 Returns count number for the to file.
 
const auto & text_added () const
 Returns text added.
 
const auto & text_removed () const
 Returns text removed.
 

Detailed Description

Offers a class that implements unified_diff report_diff for a vcs entry.

Constructor & Destructor Documentation

◆ unified_diff()

wex::unified_diff::unified_diff ( const path & p,
const vcs_entry * entry,
factory::frame * f )

Constructor.

Parameters
pThe path (under vcs).
entryProvide vcs entry to use the process std out as input.
fProvide frame, that will receive the unified diff callbacks.