FOSSredder 0.5.0
Loading...
Searching...
No Matches
ui::WorkspaceStore Class Reference

Owns the current UI-side workspace snapshot and revision lifecycle. More...

#include <WorkspaceStore.h>

Inheritance diagram for ui::WorkspaceStore:
Collaboration diagram for ui::WorkspaceStore:

Signals

void dataRevisionChanged ()

Public Member Functions

 WorkspaceStore (QObject *parent=nullptr)
 Creates an empty workspace store.
void setWorkspacePorts (core::ports::workspace::IWorkspaceWriter *writer, core::ports::workspace::IWorkspaceReader *reader)
 Binds core workspace ports used by workspace roles.
void loadFromState (const core::ports::workspace::WorkspaceSnapshot &snapshot)
 Loads a fresh workspace snapshot.
void applyDeletionImpact (const core::ports::workspace::DeletionImpact &impact)
 Applies deletion side effects to the stored snapshot.
const core::ports::workspace::WorkspaceSnapshot & snapshot () const noexcept
 Returns the current snapshot.
QString currentPath () const
 Returns the current workspace path.
int dataRevision () const noexcept
 Returns the current data revision.

Friends

class WorkspaceCommands
class WorkspaceSelectors

Detailed Description

Owns the current UI-side workspace snapshot and revision lifecycle.

Definition at line 23 of file WorkspaceStore.h.

Constructor & Destructor Documentation

◆ WorkspaceStore()

ui::WorkspaceStore::WorkspaceStore ( QObject * parent = nullptr)
explicit

Creates an empty workspace store.

Parameters
parentOptional Qt parent.

Definition at line 51 of file WorkspaceStore.cpp.

Member Function Documentation

◆ applyDeletionImpact()

void ui::WorkspaceStore::applyDeletionImpact ( const core::ports::workspace::DeletionImpact & impact)

Applies deletion side effects to the stored snapshot.

Parameters
impactDeletion impact reported by the core workspace writer.

Definition at line 69 of file WorkspaceStore.cpp.

Here is the caller graph for this function:

◆ currentPath()

QString ui::WorkspaceStore::currentPath ( ) const

Returns the current workspace path.

Returns
Current path as a Qt string, or empty when no file is open.

Definition at line 100 of file WorkspaceStore.cpp.

◆ dataRevision()

int ui::WorkspaceStore::dataRevision ( ) const
inlinenoexcept

Returns the current data revision.

Returns
Monotonic revision incremented on snapshot changes.

Definition at line 72 of file WorkspaceStore.h.

◆ dataRevisionChanged

void ui::WorkspaceStore::dataRevisionChanged ( )
signal
Here is the caller graph for this function:

◆ loadFromState()

void ui::WorkspaceStore::loadFromState ( const core::ports::workspace::WorkspaceSnapshot & snapshot)

Loads a fresh workspace snapshot.

Parameters
snapshotSnapshot returned by the core workspace reader.

Definition at line 63 of file WorkspaceStore.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWorkspacePorts()

void ui::WorkspaceStore::setWorkspacePorts ( core::ports::workspace::IWorkspaceWriter * writer,
core::ports::workspace::IWorkspaceReader * reader )

Binds core workspace ports used by workspace roles.

Parameters
writerWorkspace writer port or nullptr.
readerWorkspace reader port or nullptr.

Definition at line 53 of file WorkspaceStore.cpp.

Here is the call graph for this function:

◆ snapshot()

const core::ports::workspace::WorkspaceSnapshot & ui::WorkspaceStore::snapshot ( ) const
inlinenoexcept

Returns the current snapshot.

Returns
Stored workspace snapshot.

Definition at line 58 of file WorkspaceStore.h.

Here is the caller graph for this function:

◆ WorkspaceCommands

friend class WorkspaceCommands
friend

Definition at line 80 of file WorkspaceStore.h.

◆ WorkspaceSelectors

friend class WorkspaceSelectors
friend

Definition at line 81 of file WorkspaceStore.h.


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