LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
LC::Util::ConcurrentException< T > Class Template Reference

A concurrent exception that plays nicely with Qt. More...

#include "concurrentexception.h"

+ Inheritance diagram for LC::Util::ConcurrentException< T >:
+ Collaboration diagram for LC::Util::ConcurrentException< T >:

Public Member Functions

 ConcurrentException ()=default
 Default-constructs the exception object. More...
 
template<typename... Args>
requires requires (Args &&... args)
 Constructs the exception object with the given args. More...
 
 ConcurrentException (Args &&... args)
 
void raise () const override
 Rethrows an exception of exactly this type and state. More...
 
ConcurrentException< T > * clone () const override
 Constructs a copy of this object. More...
 
const char * what () const noexcept override
 Overrides base pure virtual. More...
 

Detailed Description

template<typename T>
class LC::Util::ConcurrentException< T >

A concurrent exception that plays nicely with Qt.

This class can be used to make some third-party exception type compatible with the QtConcurrent framework, which requires all exceptions to be derived from a Qt's base exception class.

This class wraps differences between Qt4's QtConcurrent::Exception and Qt5's QException and provides an uniform interface.

Template Parameters
TThe base type of the exception.

Definition at line 39 of file concurrentexception.h.

Constructor & Destructor Documentation

◆ ConcurrentException() [1/2]

template<typename T >
LC::Util::ConcurrentException< T >::ConcurrentException ( )
default

Default-constructs the exception object.

◆ ConcurrentException() [2/2]

template<typename T >
LC::Util::ConcurrentException< T >::ConcurrentException ( Args &&...  args)
inlineexplicit

Definition at line 57 of file concurrentexception.h.

Member Function Documentation

◆ clone()

template<typename T >
ConcurrentException<T>* LC::Util::ConcurrentException< T >::clone ( ) const
inlineoverride

Constructs a copy of this object.

Returns
The copy of this object.

Definition at line 75 of file concurrentexception.h.

◆ raise()

template<typename T >
void LC::Util::ConcurrentException< T >::raise ( ) const
inlineoverride

Rethrows an exception of exactly this type and state.

Exceptions
ConcurrentException<T>

Definition at line 66 of file concurrentexception.h.

◆ requires()

template<typename T >
template<typename... Args>
requires LC::Util::ConcurrentException< T >::requires ( Args &&...  args)
inline

Constructs the exception object with the given args.

Parameters
[in]argsThe argments to pass to the constructor of the base exception T.
Template Parameters
ArgsThe types of the arguments of the constructor of T.

Definition at line 56 of file concurrentexception.h.

◆ what()

template<typename T >
const char* LC::Util::ConcurrentException< T >::what ( ) const
inlineoverridenoexcept

Overrides base pure virtual.

Calls T::what().

Definition at line 84 of file concurrentexception.h.


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