Patch
Object Hierarchy:
Description:
public class Patch : Object
Represents a patch operation with line numbers.
Patches can be: - ADD: Inserts new_lines at start_line - REMOVE: Removes old_lines starting at start_line - REPLACE: Removes old_lines
and inserts new_lines at start_line
Content:
Properties:
- public int new_line_end { get; construct; }
Ending line number for new lines (1-based, inclusive).
- public int new_line_start { get; construct; }
Starting line number for new lines (1-based, inclusive).
- public int old_line_end { get; construct; }
Ending line number for old lines (1-based, inclusive).
- public int old_line_start { get; construct; }
Starting line number for old lines (1-based, inclusive).
- public PatchOperation operation { get; construct; }
Operation type: ADD, REMOVE, or REPLACE.
Creation methods:
- public Patch (PatchOperation op, int old_line_start, int old_line_end, int new_line_start, int new_line_end, string[] all_old_lines, string[] all_new_lines)
Constructor.
Methods:
- public string[] context (int offset)
Get context lines around the patch.
- public string[] new_lines ()
Get lines to add (computed from range).
- public string[] old_lines ()
Get lines to remove (computed from range).
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref