nf_hist::tracked

The parent class for your tracked type, stores your source data class, provides const ref access to it, and capabilities to make tracked changes to all members/sub‐elements, as well as the ability to undo/redo, traverse and manage history

Synopsis

Declared in <nf/hist.h>

class tracked;

Member Functions

Name

Description

tracked [constructor]

Constructors

clear_history

create_action

get_action_user_data

get_cursor_index

One after the index of the last action which hasn't been undone

get_pending_action_index

The index the current action will have if it's submitted

init_data

Initializes the stored data with the given input, this initialization is tracked of initTracked is true If there's an active action or any stored actions a logic_error will be thrown

operator()

operator*

operator‐>

previous_cursor_index

One after the index of the most recent un‐elided action before the current cursor

print_change_history

print_event

record_init

Creates an action recording the initialization of an object which has already occurred

redo_action

render_action

Renders the bytewise data of an action into a user‐friendly representation

render_change_history

render_event

total_actions

Includes undoable, redoable, elided, and pending actions

trim_history

Trims history so it starts at new_first_action; if new_first_action is elided the trim starts at the next unelided action

trim_history_to_size

Trims the history such that size is less than or equal to max_size

undo_action

Data Members

Name

Description

read

A read only version of the user data

view

Used to view selections data (and potentially other info associated with particular data paths)

Static Data Members

Name

no_action

Protected Types

Name

pather

Protected Member Functions

Protected Static Data Members

Name

Description

root

Represents the root of the data structure, used by client code to create paths

Template Parameters

Name

Description

Data

your source data class, which is some regular struct/class that has been reflected and which you want tracked to manage/track changes to

User

the class you're defining when extending tracked, e.g. class my_thing : tracked<my_data, my_thing> { ... };

User_data

(optional) any user‐defined data you wish to be associated with every action in the change history

Created with MrDocs