OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system
openassetio::v1::trait::property Namespace Reference

Type aliases for Trait properties within a TraitsData instance. More...

Typedefs

using Key = openassetio::Str
 Property dictionary keys. More...
 
using Value = std::variant< Bool, Int, Float, Str >
 Property dictionary values. More...
 
using KeySet = std::unordered_set< Key >
 A collection of trait property keys. More...
 

Functions

OPENASSETIO_CORE_EXPORT std::ostream & operator<< (std::ostream &out, const Value &formattable)
 Insertion operator for use with ostreams. More...
 

Detailed Description

Type aliases for Trait properties within a TraitsData instance.

Typedef Documentation

using Key = openassetio::Str

Property dictionary keys.

Keys must be UTF-8 compatible strings for required portability.

Note that typically Trait View classes will be used to access properties in a TraitsData instance via concrete member functions, so it is highly desirable that keys are ASCII to maximise portability when mapping property keys to member function names.

using KeySet = std::unordered_set<Key>

A collection of trait property keys.

Trait property keys collections are a set, rather than a list. In that, no single key can appear more than once and the order of the keys has no meaning and is not preserved.

using Value = std::variant<Bool, Int, Float, Str>

Property dictionary values.

Function Documentation

OPENASSETIO_CORE_EXPORT std::ostream& openassetio::v1::trait::property::operator<< ( std::ostream &  out,
const Value formattable 
)

Insertion operator for use with ostreams.

Formats as "Value", (or "'Value'" if formattable is a string)