Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::authoring_capsule::ComponentRef Struct Reference

A reference to one component row, for a result that must name components it does not own. More...

#include <component.hpp>

Public Types

enum class  Kind : std::uint8_t { file , dependency }

Static Public Member Functions

static ComponentRef to_file (std::string path)
static ComponentRef to_dependency (std::string id)

Public Attributes

Kind kind = Kind::file
std::string id
 The files[] row's archive path, or the dependencies[] row's id.

Friends

bool operator== (const ComponentRef &, const ComponentRef &)=default
 Ordered and compared by kind then identifier, so a list of these has a total order that does not depend on the order the rows were read.
std::strong_ordering operator<=> (const ComponentRef &, const ComponentRef &)=default

Detailed Description

A reference to one component row, for a result that must name components it does not own.

The two row kinds are identified in different namespaces: a files[] row by its archive path, a dependencies[] row by its content identity. A bare string cannot say which of the two a reader is holding, and a path-only list cannot name a dependency at all — which would make such a list structurally empty for a profile whose components are entirely dependencies. Carrying the kind alongside the identifier is what keeps the reference resolvable back to the row it came from.

Member Enumeration Documentation

◆ Kind

enum class pulp::authoring_capsule::ComponentRef::Kind : std::uint8_t
strong
Enumerator
file 
dependency 

Member Function Documentation

◆ to_dependency()

ComponentRef pulp::authoring_capsule::ComponentRef::to_dependency ( std::string id)
inlinestaticnodiscard

◆ to_file()

ComponentRef pulp::authoring_capsule::ComponentRef::to_file ( std::string path)
inlinestaticnodiscard

◆ operator<=>

std::strong_ordering operator<=> ( const ComponentRef & ,
const ComponentRef &  )
friend

◆ operator==

bool operator== ( const ComponentRef & ,
const ComponentRef &  )
friend

Ordered and compared by kind then identifier, so a list of these has a total order that does not depend on the order the rows were read.

Member Data Documentation

◆ id

std::string pulp::authoring_capsule::ComponentRef::id

The files[] row's archive path, or the dependencies[] row's id.

◆ kind

Kind pulp::authoring_capsule::ComponentRef::kind = Kind::file

The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/authoring_capsule/include/pulp/authoring_capsule/component.hpp