Albert
Loading...
Searching...
No Matches
albert::StrongDependency< T > Class Template Referencefinal

#include <albert/plugindependency.h>

Description

template<class T>
class albert::StrongDependency< T >

Convenience holder class for hard plugin dependencies.

Fetches and holds a weak pointer an extension id of type T. This class is intended to be initialized on plugin constuction without a try-catch block.

Note
Hard dependencies have to be listed in the plugin metadata, such that the plugin loader is able to manage the loading order.
Inheritance diagram for albert::StrongDependency< T >:
[legend]

Public Member Functions

 StrongDependency (QString id)
 Constructs a StrongDependency with id.
 
- Public Member Functions inherited from albert::Dependency< T >
 operator T () const
 
 operator bool () const
 
const T * operator-> () const
 
T * operator-> ()
 
const T * get () const
 
T * get ()
 

Additional Inherited Members

- Protected Member Functions inherited from albert::Dependency< T >
 Dependency ()=default
 
 ~Dependency ()=default
 
- Protected Attributes inherited from albert::Dependency< T >
T * dependency_ = nullptr
 

Constructor & Destructor Documentation

◆ StrongDependency()

template<class T >
albert::StrongDependency< T >::StrongDependency ( QString  id)
inline

Constructs a StrongDependency with id.

Exceptions
std::runtime_errorif the dependency is not available or not of type T.

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