IOLink 1.11.0
Loading...
Searching...
No Matches
iolink::ViewOriginExtension Class Referenceabstract

Extension used to access view's origins if it exists. More...

#include <iolink/view/ViewOriginExtension.h>

Inheritance diagram for iolink::ViewOriginExtension:
iolink::Extension CheckerboardImageView::ViewOriginImpl

Public Member Functions

virtual uint64_t uid () const =0
 Returns an unique identifier for current view.
 
virtual size_t parentCount () const =0
 Returns the count of parents used to create the current view.
 
virtual std::shared_ptr< ViewOriginExtensionparent (size_t idx) const =0
 Returns, for the given index, the viewOrigin extension of the parent used to create the current view.
 
virtual ViewDataOrigin dataOrigin () const =0
 Returns the data origin of current view.
 
virtual std::string displayName () const =0
 Returns the name of the current view to display.
 
std::string toString () const
 String representation of the extension.
 

Static Public Member Functions

static std::shared_ptr< ViewOriginExtensioncast (const std::shared_ptr< Extension > &extension)
 Upcast a generic extension to this specific type.
 

Static Public Attributes

static constexpr size_t EXTENSION_ID = 0x3
 Identifier used to load the extension using the View::extension method.
 

Detailed Description

Extension used to access view's origins if it exists.

Views can be created from scratch, but also from one or many other views. This extension provides methods which allow to build the dependency tree of current view. It also helps to retrieve information to know data origin and to identify a view between others.

Examples
customImageView.cpp.

Member Function Documentation

◆ cast()

static std::shared_ptr< ViewOriginExtension > iolink::ViewOriginExtension::cast ( const std::shared_ptr< Extension > &  extension)
inlinestatic

Upcast a generic extension to this specific type.

Parameters
extensionThe extension to cast.
Returns
The upcasted extension. This will be null if no upcasting is possible.

◆ dataOrigin()

virtual ViewDataOrigin iolink::ViewOriginExtension::dataOrigin ( ) const
pure virtual

Returns the data origin of current view.

Exceptions
Errorif data origin is not available

Implemented in CheckerboardImageView::ViewOriginImpl.

◆ displayName()

virtual std::string iolink::ViewOriginExtension::displayName ( ) const
pure virtual

Returns the name of the current view to display.

Exceptions
Errorif display name is not available

Implemented in CheckerboardImageView::ViewOriginImpl.

◆ parent()

virtual std::shared_ptr< ViewOriginExtension > iolink::ViewOriginExtension::parent ( size_t  idx) const
pure virtual

Returns, for the given index, the viewOrigin extension of the parent used to create the current view.

Parameters
idxindex of parent to retrieve
Exceptions
Errorif the index is out of range
Returns
a ViewOrigin extension which cannot be null

Implemented in CheckerboardImageView::ViewOriginImpl.

◆ parentCount()

virtual size_t iolink::ViewOriginExtension::parentCount ( ) const
pure virtual

Returns the count of parents used to create the current view.

Returns
count of view's parents

Implemented in CheckerboardImageView::ViewOriginImpl.

◆ uid()

virtual uint64_t iolink::ViewOriginExtension::uid ( ) const
pure virtual

Returns an unique identifier for current view.

Returns
view identifier

Implemented in CheckerboardImageView::ViewOriginImpl.


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