Beatmup
Beatmup::OutOfRange Class Reference

#include <exception.h>

Inheritance diagram for Beatmup::OutOfRange:
Beatmup::InvalidArgument Beatmup::Exception

Static Public Member Functions

template<typename datatype >
static void check (const datatype value, const datatype min, const datatype max, const char *message)
 
template<typename datatype >
static void checkMin (const datatype value, const datatype min, const char *message)
 
- Static Public Member Functions inherited from Beatmup::InvalidArgument
static void check (const bool condition, const std::string &message)
 

Private Member Functions

template<typename datatype >
 OutOfRange (const char *message, const datatype value)
 

Additional Inherited Members

- Public Member Functions inherited from Beatmup::InvalidArgument
 InvalidArgument (const std::string &message)
 
- Public Member Functions inherited from Beatmup::Exception
virtual const char * what () const NOEXCEPT override
 
- Protected Member Functions inherited from Beatmup::InvalidArgument
template<typename datatype >
 InvalidArgument (const char *message, const datatype value)
 
- Protected Member Functions inherited from Beatmup::Exception
 Exception (const char *message)
 
template<typename ... Args>
 Exception (const char *message, const Args &... args)
 

Detailed Description

Definition at line 81 of file exception.h.

Constructor & Destructor Documentation

◆ OutOfRange()

template<typename datatype >
Beatmup::OutOfRange::OutOfRange ( const char *  message,
const datatype  value 
)
inlineprivate

Definition at line 83 of file exception.h.

83 : InvalidArgument(message, value) {}
std::string message
Definition: exception.h:39
InvalidArgument(const char *message, const datatype value)
Definition: exception.h:72

Member Function Documentation

◆ check()

template<typename datatype >
static void Beatmup::OutOfRange::check ( const datatype  value,
const datatype  min,
const datatype  max,
const char *  message 
)
inlinestatic

Definition at line 86 of file exception.h.

86  {
87  if (value < min || max < value)
88  throw OutOfRange(message, value);
89  }
OutOfRange(const char *message, const datatype value)
Definition: exception.h:83
CustomPoint< numeric > min(const CustomPoint< numeric > &a, const CustomPoint< numeric > &b)
Definition: geometry.h:724
CustomPoint< numeric > max(const CustomPoint< numeric > &a, const CustomPoint< numeric > &b)
Definition: geometry.h:728

◆ checkMin()

template<typename datatype >
static void Beatmup::OutOfRange::checkMin ( const datatype  value,
const datatype  min,
const char *  message 
)
inlinestatic

Definition at line 92 of file exception.h.

92  {
93  if (value < min)
94  throw OutOfRange(message, value);
95  }

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