OpenAssetIO
An abstract API for generalising interactions between a host application and an asset management system

The EntityReferencePager allows for the retrieval and traversal of large datasets in a paginated manner. More...

#include <EntityReferencePager.hpp>

Public Types

using Ptr = EntityReferencePagerPtr
 
using ConstPtr = EntityReferencePagerConstPtr
 
using Page = EntityReferences
 

Public Member Functions

 EntityReferencePager (const EntityReferencePager &)=delete
 Deleted copy constructor. More...
 
EntityReferencePageroperator= (const EntityReferencePager &)=delete
 Deleted copy assignment operator. More...
 
 EntityReferencePager (EntityReferencePager &&) noexcept=default
 Defaulted move constructor. More...
 
EntityReferencePageroperator= (EntityReferencePager &&) noexcept=default
 Defaulted move assignment operator. More...
 
 ~EntityReferencePager ()
 Destruction of this object is tantamount to closing the query. More...
 
bool hasNext ()
 Return whether or not there is more data accessible by advancing the page. More...
 
Page get ()
 Return the current page of data. More...
 
void next ()
 Advance the page. More...
 

Static Public Member Functions

static EntityReferencePager::Ptr make (managerApi::EntityReferencePagerInterfacePtr pagerInterface, managerApi::HostSessionPtr hostSession)
 Constructs a new EntityReferencePager wrapping a manager plugin's implementation. More...
 

Detailed Description

The EntityReferencePager allows for the retrieval and traversal of large datasets in a paginated manner.

Note
Instances of this class should not be constructed directly by the host.
See also
Manager::getWithRelationship
Manager::getWithRelationships

None of the functions of this class should be considered thread-safe. Hosts should add their own synchronization around concurrent usage.

Due to the variance of backends, construction, hasNext, get and next may all reasonably need to perform non-trivial, networked operations, and thus performance characteristics should not be assumed.

Destruction of this object is a signal to the manager that the connection query is finished. For this reason you should avoid keeping hold of this object for longer than necessary.

Member Typedef Documentation

Constructor & Destructor Documentation

Deleted copy constructor.

EntityReferencePager cannot be copied, as each object represents a single paginated query.

EntityReferencePager ( EntityReferencePager &&  )
defaultnoexcept

Defaulted move constructor.

Destruction of this object is tantamount to closing the query.

Member Function Documentation

Page get ( )

Return the current page of data.

If the current page has advanced beyond the last page, an empty list will be returned.

Returns
The current page's list of entity references.
bool hasNext ( )

Return whether or not there is more data accessible by advancing the page.

Returns
true if another page is available, false otherwise.

Constructs a new EntityReferencePager wrapping a manager plugin's implementation.

Note
Instances of this class should not be constructed directly by the host.
Parameters
pagerInterfaceImplementation of the underlying pager.
hostSessionThe API session.
Returns
Newly created instance wrapped in a std::shared_ptr.
void next ( )

Advance the page.

Advancing beyond the last page is not an error, but will result in all subsequent calls to get to return an empty page, whilst hasNext will continue to return false.

EntityReferencePager& operator= ( const EntityReferencePager )
delete

Deleted copy assignment operator.

EntityReferencePager cannot be copied, as each object represents a single paginated query.

EntityReferencePager& operator= ( EntityReferencePager &&  )
defaultnoexcept

Defaulted move assignment operator.


The documentation for this class was generated from the following file:
  • /src/src/openassetio-core/include/openassetio/hostApi/EntityReferencePager.hpp