OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system
|
The Context object is used to convey information about the calling environment to a manager. More...
#include <Context.hpp>
Public Types | |
using | Ptr = ContextPtr |
using | ConstPtr = ContextConstPtr |
Static Public Member Functions | |
static ContextPtr | make (trait::TraitsDataPtr locale=trait::TraitsData::make(), managerApi::ManagerStateBasePtr managerState=nullptr) |
Constructs a new context. More... | |
Public Attributes | |
trait::TraitsDataPtr | locale |
In many situations, the Trait Set of the desired entity itself is not entirely sufficient information to realize many functions that a manager wishes to implement. More... | |
managerApi::ManagerStateBasePtr | managerState |
The opaque state token owned by the manager, used to correlate all API calls made using this context. More... | |
The Context object is used to convey information about the calling environment to a manager.
It holds additional information about the host that may be useful to the manager. Optionally, it holds arbitrary, opaque (to the host), serializable manager state, which can be used by the manager plugin to tie together related calls.
A Manager will also use this information to ensure it presents the correct UI, or behavior.
The Context is passed to many calls in this API, and it may, or may not need to be used directly.
using ConstPtr = ContextConstPtr |
using Ptr = ContextPtr |
|
static |
Constructs a new context.
trait::TraitsDataPtr locale |
In many situations, the Trait Set of the desired entity itself is not entirely sufficient information to realize many functions that a manager wishes to implement.
For example, when determining the final file path for an Image that is about to be published - knowing it came from a render catalog, rather than a 'Write node' from a comp tree could result in different behavior.
The Locale uses a TraitsData to describe in more detail, what specific part of a host is requesting an action. In the case of a file browser for example, it may also include information such as whether or not multi-selection is required.
managerApi::ManagerStateBasePtr managerState |
The opaque state token owned by the manager, used to correlate all API calls made using this context.
Copyright 2013-2023 The Foundry Visionmongers Ltd. OpenAssetIO is released under the Apache 2.0 License