FileSurfer 1.1.4
Modern Windows File Explorer
Loading...
Searching...
No Matches
FileSurfer.Models.UndoRedoHandler< T > Class Template Referencesealed

Generic class for browsing FileSurfer's history, such as file operations and visited directories. More...

Collaboration diagram for FileSurfer.Models.UndoRedoHandler< T >:

Classes

class  UndoRedoNode
 Nested class representing a node in the UndoRedoHandler<T> chain. More...

Public Member Functions

 UndoRedoHandler ()
 Constructs a new UndoRedoHandler<T> chain.
void AddNewNode (T data)
 Adds a new node at the current position in the chain and cuts of following nodes.
bool IsTail ()
 Determines if the current UndoRedoNode is the end of the UndoRedoHandler<T> chain.
bool IsHead ()
 Determines if the current UndoRedoNode is the beginning of the UndoRedoHandler<T> chain.
T? GetPrevious ()
 Gets the data of the previous UndoRedoNode in the UndoRedoHandler<T> chain.
T? GetNext ()
 Gets the data of the next UndoRedoNode in the UndoRedoHandler<T> chain.
void MoveToPrevious ()
 Moves to the previous UndoRedoNode in the UndoRedoHandler<T> chain.
void MoveToNext ()
 Moves to the next UndoRedoNode in the UndoRedoHandler<T> chain.
void RemoveNode (bool goToPrevious)
 Removes the current UndoRedoNode from the UndoRedoHandler<T> chain.

Package Functions

 UndoRedoNode (T? data, UndoRedoNode? previous=null, UndoRedoNode? next=null)

Package Attributes

T? Data
UndoRedoNodePrevious
UndoRedoNodeNext

Properties

T? Current [get]
 Returns the data of the current UndoRedoNode.

Private Attributes

readonly UndoRedoNode _head
readonly UndoRedoNode _tail
UndoRedoNode _current

Detailed Description

Generic class for browsing FileSurfer's history, such as file operations and visited directories.

Member Function Documentation

◆ AddNewNode()

void FileSurfer.Models.UndoRedoHandler< T >.AddNewNode ( T data)
inline

Adds a new node at the current position in the chain and cuts of following nodes.

Here is the call graph for this function:

◆ GetNext()

T? FileSurfer.Models.UndoRedoHandler< T >.GetNext ( )

Gets the data of the next UndoRedoNode in the UndoRedoHandler<T> chain.

◆ GetPrevious()

T? FileSurfer.Models.UndoRedoHandler< T >.GetPrevious ( )

Gets the data of the previous UndoRedoNode in the UndoRedoHandler<T> chain.

◆ IsHead()

bool FileSurfer.Models.UndoRedoHandler< T >.IsHead ( )

Determines if the current UndoRedoNode is the beginning of the UndoRedoHandler<T> chain.

◆ IsTail()

bool FileSurfer.Models.UndoRedoHandler< T >.IsTail ( )

Determines if the current UndoRedoNode is the end of the UndoRedoHandler<T> chain.

◆ MoveToNext()

void FileSurfer.Models.UndoRedoHandler< T >.MoveToNext ( )

Moves to the next UndoRedoNode in the UndoRedoHandler<T> chain.

◆ MoveToPrevious()

void FileSurfer.Models.UndoRedoHandler< T >.MoveToPrevious ( )

Moves to the previous UndoRedoNode in the UndoRedoHandler<T> chain.

Here is the caller graph for this function:

◆ RemoveNode()

void FileSurfer.Models.UndoRedoHandler< T >.RemoveNode ( bool goToPrevious)
inline

Removes the current UndoRedoNode from the UndoRedoHandler<T> chain.

Throws InvalidOperationException if _current is either _head or _tail.

Parameters
goToPrevious
Exceptions
InvalidOperationExceptionThrows exception if _current is either _head or _tail.

◆ UndoRedoHandler()

FileSurfer.Models.UndoRedoHandler< T >.UndoRedoHandler ( )
inline

Constructs a new UndoRedoHandler<T> chain.

◆ UndoRedoNode()

FileSurfer.Models.UndoRedoHandler< T >.UndoRedoNode ( T? data,
UndoRedoNode? previous = null,
UndoRedoNode? next = null )
inlinepackage

Member Data Documentation

◆ _current

UndoRedoNode FileSurfer.Models.UndoRedoHandler< T >._current
private

◆ _head

readonly UndoRedoNode FileSurfer.Models.UndoRedoHandler< T >._head
private

◆ _tail

readonly UndoRedoNode FileSurfer.Models.UndoRedoHandler< T >._tail
private

◆ Data

T? FileSurfer.Models.UndoRedoHandler< T >.Data
package

◆ Next

UndoRedoNode? FileSurfer.Models.UndoRedoHandler< T >.Next
package

◆ Previous

UndoRedoNode? FileSurfer.Models.UndoRedoHandler< T >.Previous
package

Property Documentation

◆ Current

T? FileSurfer.Models.UndoRedoHandler< T >.Current
get

Returns the data of the current UndoRedoNode.


The documentation for this class was generated from the following file: