Jpp  18.3.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
JTOOLS::JFunctional< JArgument_t, JResult_t >::JDefaultResult Struct Reference

Exception handler for functional object using default result. More...

#include <JFunctional.hh>

Inheritance diagram for JTOOLS::JFunctional< JArgument_t, JResult_t >::JDefaultResult:
JTOOLS::JFunctional< JArgument_t, JResult_t >::JExceptionHandler JLANG::JException

Public Member Functions

 JDefaultResult (const result_type value)
 Constructor. More...
 
 JDefaultResult (const JMATH::JZero &value)
 Constructor. More...
 
virtual result_type action (const JException &error) const override
 Implementation of exception handler. More...
 
result_type action () const
 Implementation of exception handler. More...
 

Private Attributes

result_type defaultResult
 

Detailed Description

template<class JArgument_t = JNullType, class JResult_t = JNullType>
struct JTOOLS::JFunctional< JArgument_t, JResult_t >::JDefaultResult

Exception handler for functional object using default result.

Definition at line 178 of file JFunctional.hh.

Constructor & Destructor Documentation

template<class JArgument_t = JNullType, class JResult_t = JNullType>
JTOOLS::JFunctional< JArgument_t, JResult_t >::JDefaultResult::JDefaultResult ( const result_type  value)
inline

Constructor.

Parameters
valuedefault result in case of exception

Definition at line 186 of file JFunctional.hh.

186  :
188  defaultResult(value)
189  {}
JExceptionHandler()
Default constructor.
Definition: JFunctional.hh:137
template<class JArgument_t = JNullType, class JResult_t = JNullType>
JTOOLS::JFunctional< JArgument_t, JResult_t >::JDefaultResult::JDefaultResult ( const JMATH::JZero value)
inline

Constructor.

Parameters
valuedefault result in case of exception

Definition at line 197 of file JFunctional.hh.

197  :
199  defaultResult()
200  {}
JExceptionHandler()
Default constructor.
Definition: JFunctional.hh:137

Member Function Documentation

template<class JArgument_t = JNullType, class JResult_t = JNullType>
virtual result_type JTOOLS::JFunctional< JArgument_t, JResult_t >::JDefaultResult::action ( const JException error) const
inlineoverridevirtual

Implementation of exception handler.

This implementation returns the default value.

Parameters
errorerror
Returns
default value

Reimplemented from JTOOLS::JFunctional< JArgument_t, JResult_t >::JExceptionHandler.

Definition at line 210 of file JFunctional.hh.

211  {
212  return defaultResult;
213  }
template<class JArgument_t = JNullType, class JResult_t = JNullType>
result_type JTOOLS::JFunctional< JArgument_t, JResult_t >::JExceptionHandler::action ( ) const
inlineinherited

Implementation of exception handler.

This implementation throws the exception.

Returns
value

Definition at line 155 of file JFunctional.hh.

156  {
157  return this->action(static_cast<const JException&>(*this));
158  }
result_type action() const
Implementation of exception handler.
Definition: JFunctional.hh:155

Member Data Documentation

template<class JArgument_t = JNullType, class JResult_t = JNullType>
result_type JTOOLS::JFunctional< JArgument_t, JResult_t >::JDefaultResult::defaultResult
private

Definition at line 216 of file JFunctional.hh.


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