Skip to content

GuitarPrometheus::Profiles::ClipboardPort

GuitarPrometheus::Profiles::ClipboardPort

Thin seam around the system clipboard so ProfileStore can be tested without touching real OS state. More…

#include <ClipboardPort.h>

Inherited by guitar_prometheus::JuceClipboardPort

Public Functions

Name
virtual~ClipboardPort() =default
virtual std::stringread() const =0
Read the current clipboard text.
virtual voidwrite(const std::string & text) =0
Overwrite the clipboard with the given text.

Detailed Description

class GuitarPrometheus::Profiles::ClipboardPort;

Thin seam around the system clipboard so ProfileStore can be tested without touching real OS state.

The production implementation (JuceClipboardPort, defined in ProfileStore.cpp as a private class) wraps juce::SystemClipboard. Tests substitute an in-memory fake.

Public Functions Documentation

function ~ClipboardPort

virtual ~ClipboardPort() =default

function read

virtual std::string read() const =0

Read the current clipboard text.

Return: Clipboard contents as UTF-8. Empty string if the clipboard is empty or contains non-text data.

Reimplemented by: guitar_prometheus::JuceClipboardPort::read

function write

virtual void write(
const std::string & text
) =0

Overwrite the clipboard with the given text.

Parameters:

  • text UTF-8 text to place on the clipboard.

Reimplemented by: guitar_prometheus::JuceClipboardPort::write


Updated on 2026-05-29 at 07:39:52 +0000