CNDSM  1.00
MCFClass::MCFException Class Reference

Very small class to simplify extracting the "+ infinity" value for a basic type (FNumber, CNumber, Index); just use Inf<type>(). More...

#include <MCFClass.h>

Inherits exception.

Detailed Description

Very small class to simplify extracting the "+ infinity" value for a basic type (FNumber, CNumber, Index); just use Inf<type>().

template <typename t>=""> class Inf { public: Inf() {} operator T() { return( std::numeric_limits<T>::max() ); } }; Very small class to simplify extracting the "machine epsilon" for a basic type (FNumber, CNumber); just use Eps<type>().

template <typename t>=""> class Eps { public: Eps() {} operator T() { return( std::numeric_limits<T>::epsilon() ); } };Small class for exceptions. Derives from std::exception implementing the virtual method what() – and since what is virtual, remember to always catch it by reference (catch exception &e) if you want the thing to work. MCFException class are thought to be of the "fatal" type, i.e., problems for which no solutions exists apart from aborting the program. Other kinds of exceptions can be properly handled by defining derived classes with more information.