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

Comprises concrete trait views wrapping TraitsData instances. More...

Namespaces

 property
 Type aliases for Trait properties within a TraitsData instance.
 

Classes

class  TraitsData
 A transport-level container for data exchange between a host and a manager. More...
 

Typedefs

using TraitsDataPtr = std::shared_ptr< TraitsData >
 
using TraitsDataConstPtr = std::shared_ptr< const TraitsData >
 
using TraitSet = std::set< TraitId >
 A collection of trait IDs. More...
 
using TraitSets = std::vector< TraitSet >
 An ordered list of trait sets. More...
 
using TraitsDatas = std::vector< TraitsDataPtr >
 An ordered list of TraitsData instances. More...
 
using TraitId = property::Key
 Trait unique ID type. More...
 

Enumerations

enum  TraitPropertyStatus { kFound, kMissing, kInvalidValue }
 Status of a trait property within a specification. More...
 

Functions

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

Detailed Description

Comprises concrete trait views wrapping TraitsData instances.

Typedef Documentation

Trait unique ID type.

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

Note that typically Trait View classes will be used to access properties within a TraitsData instance, rather than direct property access using a TraitId, so it is desirable that trait IDs are ASCII to maximise portability when mapping IDs to class names.

typedef std::shared_ptr< const TraitsData > TraitsDataConstPtr
typedef std::shared_ptr< TraitsData > TraitsDataPtr
using TraitsDatas = std::vector<TraitsDataPtr>

An ordered list of TraitsData instances.

using TraitSet = std::set<TraitId>

A collection of trait IDs.

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

using TraitSets = std::vector<TraitSet>

An ordered list of trait sets.

Enumeration Type Documentation

enum TraitPropertyStatus
strong

Status of a trait property within a specification.

Enumerator
kFound 
kMissing 
kInvalidValue 

Function Documentation

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

Insertion operator for use with ostreams.

Formats as "{'aTrait': {'aTraitProperty': traitValue, 'anotherTraitProperty': anotherTraitValue}, 'anotherTrait': {aTraitProperty: traitValue}}".

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

Insertion operator for use with ostreams.

Formats as "{'aTrait': {'aTraitProperty': traitValue, 'anotherTraitProperty': anotherTraitValue}, 'anotherTrait': {aTraitProperty: traitValue}}".

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

Insertion operator for use with ostreams.

Formats as "{'aTrait': {'aTraitProperty': traitValue, 'anotherTraitProperty': anotherTraitValue}, 'anotherTrait': {aTraitProperty: traitValue}}".