Jpp  17.3.0
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

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...
 

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 163 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 171 of file JFunctional.hh.

171  :
173  defaultResult(value)
174  {}
JExceptionHandler()
Default constructor.
Definition: JFunctional.hh:136
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 182 of file JFunctional.hh.

182  :
184  defaultResult()
185  {}
JExceptionHandler()
Default constructor.
Definition: JFunctional.hh:136

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 195 of file JFunctional.hh.

196  {
197  return defaultResult;
198  }

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 201 of file JFunctional.hh.


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