A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::flow::catalogue::Catalogue Class Reference

Everything the tools know about the world, in one place. More...

#include <cpp/a11/flow/catalogue.h>

Public Member Functions

Catalogue MergedWith (const Catalogue &other) const
 This catalogue with other laid over it.
 
const ActionInfo *absl_nullable Action (std::string_view name) const
 
const TypeInfo *absl_nullable Type (std::string_view tag) const
 
const std::vector< ActionInfo > & actions () const
 
const std::vector< TypeInfo > & types () const
 
bool Empty () const
 
nlohmann::json ToJson () const
 

Static Public Member Functions

static const Catalogue & Builtin ()
 The embedded snapshot: what a standalone tool knows with nothing configured.
 
static Catalogue Of (std::vector< ActionInfo > actions, std::vector< TypeInfo > types={})
 The catalogue these entries make.
 
static Catalogue FromJson (const nlohmann::json &value)
 The catalogue value describes, in the shape [ToJson] writes.
 

Detailed Description

Everything the tools know about the world, in one place.

Member Function Documentation

◆ Action()

const ActionInfo *absl_nullable a11::flow::catalogue::Catalogue::Action ( std::string_view  name) const

◆ actions()

const std::vector< ActionInfo > & a11::flow::catalogue::Catalogue::actions ( ) const
inline

◆ Builtin()

const Catalogue & a11::flow::catalogue::Catalogue::Builtin ( )
static

The embedded snapshot: what a standalone tool knows with nothing configured.

◆ Empty()

bool a11::flow::catalogue::Catalogue::Empty ( ) const
inline

◆ FromJson()

Catalogue a11::flow::catalogue::Catalogue::FromJson ( const nlohmann::json &  value)
static

The catalogue value describes, in the shape [ToJson] writes.

Never fails. Fields with unexpected types are skipped for compatibility with older and newer frontends.

◆ MergedWith()

Catalogue a11::flow::catalogue::Catalogue::MergedWith ( const Catalogue &  other) const

This catalogue with other laid over it.

A name in other replaces the corresponding entry; other existing names remain. Whole-entry replacement avoids combining fields from two distinct descriptions.

◆ Of()

Catalogue a11::flow::catalogue::Catalogue::Of ( std::vector< ActionInfo >  actions,
std::vector< TypeInfo >  types = {} 
)
static

The catalogue these entries make.

For a producer that has the entries as values rather than as JSON, which is what discover::Discover is: it reads source and builds ActionInfos, and routing them out through JSON and back would be a round trip that could only lose things.

◆ ToJson()

nlohmann::json a11::flow::catalogue::Catalogue::ToJson ( ) const

◆ Type()

const TypeInfo *absl_nullable a11::flow::catalogue::Catalogue::Type ( std::string_view  tag) const

◆ types()

const std::vector< TypeInfo > & a11::flow::catalogue::Catalogue::types ( ) const
inline

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